The open-source Arc replacement for macOS. Spaces, pinned tabs, split view, Little Windows and Arc's shortcuts on Chromium, with your Arc sidebar imported in one go.
Shipped-issue locks for imports, profiles, privacy, performance and platform
Victor2187622b30bf
diff --git a/Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swift b/Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swiftindex 229da83..6f5282e 100644--- a/Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swift@@ -4,28 +4,28 @@ import Testing/// Each profile's website languages under Settings ▸ Profiles (#209).struct BrowserLanguagesTests {- @Test func readsThePrefAsChromiumListsIt() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/209")) func readsThePrefAsChromiumListsIt() {#expect(BrowserLanguages.codes("da,en-GB,en-US,en") == ["da", "en-GB", "en-US", "en"])// CraCEFRuntime.preference hands back JSON.#expect(BrowserLanguages.codes("\"zh-CN,zh,en\"") == ["zh-CN", "zh", "en"])#expect(BrowserLanguages.codes(" en-US , en ") == ["en-US", "en"])}- @Test func dropsWhatIsNotALanguageList() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/209")) func dropsWhatIsNotALanguageList() {#expect(BrowserLanguages.codes("") == [])#expect(BrowserLanguages.codes("\"unterminated") == [])#expect(BrowserLanguages.codes("[\"en\"]") == [])#expect(BrowserLanguages.codes("en,,de;q=0.9,en") == ["en"])}- @Test func readsAProfilesPreferencesFile() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/209")) func readsAProfilesPreferencesFile() {let file = #"{"intl":{"accept_languages":"da-DK,da,en-US,en","selected_languages":"da-DK,da,en-US,en"},"profile":{}}"##expect(BrowserLanguages.codes(preferencesFile: Data(file.utf8)) == ["da-DK", "da", "en-US", "en"])#expect(BrowserLanguages.codes(preferencesFile: Data(#"{"profile":{}}"#.utf8)) == nil)#expect(BrowserLanguages.codes(preferencesFile: Data("not json".utf8)) == nil)}- @Test func namesLanguagesInEnglish() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/209")) func namesLanguagesInEnglish() {#expect(BrowserLanguages.name("da") == "Danish")#expect(BrowserLanguages.name("en-GB") == "English (United Kingdom)")#expect(BrowserLanguages.summary(["da", "en-US", "en"]) == "Danish, English (United States), English")diff --git a/Packages/CraCore/Tests/CraCoreTests/ChromiumLocaleTests.swift b/Packages/CraCore/Tests/CraCoreTests/ChromiumLocaleTests.swiftindex 0281fe6..5899aed 100644--- a/Packages/CraCore/Tests/CraCoreTests/ChromiumLocaleTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/ChromiumLocaleTests.swift@@ -33,12 +33,12 @@ struct ChromiumLocaleTests {(["is-IS"], "en-US"),]- @Test(arguments: languages)+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/167"), arguments: languages)func followsMacOS(preferred: [String], locale: String) {#expect(ChromiumLocale.pick(available: Self.cef, preferredLanguages: preferred) == locale)}- @Test func noLocalesLeavesCEFsDefault() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/167")) func noLocalesLeavesCEFsDefault() {#expect(ChromiumLocale.pick(available: [], preferredLanguages: ["zh-Hans-CN"]) == nil)#expect(ChromiumLocale.pick(available: ["Base"], preferredLanguages: ["zh-Hans-CN"]) == nil)}diff --git a/Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swift b/Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swiftindex acde511..9a26465 100644--- a/Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swift@@ -6,13 +6,13 @@ import Testingstruct DownloadLocationTests {let downloads = URL(fileURLWithPath: "/Users/me/Downloads", isDirectory: true)- @Test func profilesWithoutAChoiceUseDownloadsWithoutAsking() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/190")) func profilesWithoutAChoiceUseDownloadsWithoutAsking() {let s = AppSettings()#expect(s.downloadLocation(profileID: nil) == DownloadLocation())#expect(s.downloadLocation(profileID: UUID()).folderURL(downloads: downloads) { _ in true } == downloads)}- @Test func eachProfileKeepsItsOwn() throws {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/190")) func eachProfileKeepsItsOwn() throws {var s = AppSettings()let work = UUID()s.setDownloadLocation(DownloadLocation(folder: "/Volumes/Work", askWhereToSave: false), profileID: work)@@ -26,14 +26,14 @@ struct DownloadLocationTests {#expect(Set(back.downloadLocations.keys) == [work.uuidString, "Default"])}- @Test func goingBackToTheDefaultDropsTheEntry() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/190")) func goingBackToTheDefaultDropsTheEntry() {var s = AppSettings()s.setDownloadLocation(DownloadLocation(askWhereToSave: true), profileID: nil)s.setDownloadLocation(DownloadLocation(), profileID: nil)#expect(s.downloadLocations.isEmpty)}- @Test func aMissingFolderFallsBackToDownloads() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/190")) func aMissingFolderFallsBackToDownloads() {let l = DownloadLocation(folder: "/Volumes/Unplugged")#expect(l.folderURL(downloads: downloads) { _ in false } == downloads)#expect(l.folderURL(downloads: downloads) { _ in true }.path == "/Volumes/Unplugged")diff --git a/Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift b/Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swiftindex fa6fd9d..99fd135 100644--- a/Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift@@ -24,7 +24,7 @@ struct ExtensionProfilesTests {#expect(p.folders.isEmpty)}- @Test func commandLineFollowsTheLoadExtensionOrder() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/131")) func commandLineFollowsTheLoadExtensionOrder() {let p = ExtensionProfiles(folders: ["b": ["Profile 2", "Default"]])#expect(p.commandLineValue(forFolders: ["a", "b", "c"]) == "*,Default|Profile 2,*")#expect(p.commandLineValue(forFolders: ["a", "c"]) == nil, "no switch when every folder loads everywhere")@@ -37,7 +37,7 @@ struct ExtensionProfilesTests {#expect(try JSONDecoder().decode(ExtensionProfiles.self, from: Data("{}".utf8)) == ExtensionProfiles())}- @Test func arcSpaceProfiles() throws {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/131")) func arcSpaceProfiles() throws {func parse(_ json: String) throws -> String? {ImportProfileMap.arcProfileFolder(try JSONSerialization.jsonObject(with: Data(json.utf8)))}@@ -48,7 +48,7 @@ struct ExtensionProfilesTests {#expect(try parse(#"{"custom": {"_0": {"directoryBasename": "Profile 2/../../x"}}}"#) == nil, "never a path out of User Data")}- @Test func importedExtensionsGoWhereTheirProfilesWent() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/131")) func importedExtensionsGoWhereTheirProfilesWent() {let map = ImportProfileMap(folders: ["Profile 2": "Profile A", "Profile 7": "Profile B"])let all: Set<String> = ["Default", "Profile A", "Profile B"]#expect(map.craFolder(forSource: "Profile 2") == "Profile A")@@ -62,7 +62,7 @@ struct ExtensionProfilesTests {"an import that bound no profiles changes nothing")}- @Test func importedPinsSeedOnlyNewLists() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/131")) func importedPinsSeedOnlyNewLists() {var pins = PinnedExtensions(shared: ["a"])pins.seed(["b", "c"], inProfile: "Profile A")pins.seed(["a"], inProfile: "Profile B")@@ -72,7 +72,7 @@ struct ExtensionProfilesTests {}/// Rebuild from Arc (#131): spaces an older import left on Default go back to their Arc profiles.- @Test func rebuildMatchesSpacesByName() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/131")) func rebuildMatchesSpacesByName() {let home = UUID(), work = UUID(), client = UUID(), mine = UUID(), twin1 = UUID(), twin2 = UUID(), shared = UUID()let cra = [ArcProfileRebuild.CraSpace(id: home, title: "Home", movable: true),@@ -94,7 +94,7 @@ struct ExtensionProfilesTests {#expect(moves.first?.folder == "Profile 2" && moves.first?.profileName == "Work" && moves.first?.spaceTitle == "work")}- @Test func rebuildKeepsExtensionsInProfilesMadeInCra() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/131")) func rebuildKeepsExtensionsInProfilesMadeInCra() {let map = ImportProfileMap(folders: ["Default": "Default", "Profile 2": "Profile W"])let all: Set<String> = ["Default", "Profile W", "Profile Mine"]#expect(map.extensionProfiles(sources: ["Profile 2"], allFolders: all, keepUnmapped: true) == ["Profile W", "Profile Mine"])diff --git a/Packages/CraCore/Tests/CraCoreTests/PerfSessionTests.swift b/Packages/CraCore/Tests/CraCoreTests/PerfSessionTests.swiftindex bdc2fe0..ebc456f 100644--- a/Packages/CraCore/Tests/CraCoreTests/PerfSessionTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/PerfSessionTests.swift@@ -6,19 +6,19 @@ import Testingstruct PerfSessionTests {let start = Date(timeIntervalSince1970: 1_793_000_000)- @Test(arguments: [(true, [:], true), (false, [:], false), (true, ["CRA_PERF": "0"], false), (true, ["CRA_PERF": "1"], true)]+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91"), arguments: [(true, [:], true), (false, [:], false), (true, ["CRA_PERF": "0"], false), (true, ["CRA_PERF": "1"], true)]as [(Bool, [String: String], Bool)])func recordingFollowsTheSettingUnlessTheEnvironmentTurnsItOff(setting: Bool, env: [String: String], on: Bool) {#expect(PerfSessionRules.recording(setting: setting, environment: env) == on)}- @Test func onlyTheOwnerWritesAndOnlyWhileRecording() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91")) func onlyTheOwnerWritesAndOnlyWhileRecording() {#expect(PerfSessionRules.writesFiles(owner: true, recording: true))#expect(!PerfSessionRules.writesFiles(owner: false, recording: true))#expect(!PerfSessionRules.writesFiles(owner: true, recording: false))}- @Test func aMarkerLeftBehindIsAnAbnormalEnd() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91")) func aMarkerLeftBehindIsAnAbnormalEnd() {let marker = PerfSessionMarker(id: "abc", launch: 3, startedAt: start, pid: 42, craVersion: "0.1.26")var history = PerfHistory()history.lastSession = PerfPreviousSession(id: "old", launch: 2, startedAt: start, craVersion: "0.1.25", abnormal: false, endedAt: start)diff --git a/Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift b/Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swiftindex 485fa6e..428e343 100644--- a/Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift@@ -59,7 +59,7 @@ struct PerfStateTests {storage: .init(profileBytes: 500 << 20, cacheBytes: 200 << 20))}- @Test func stallsAreCountedByKindAndHeldMenusAreNotFreezes() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91"), .bug("https://github.com/VictorKildahl/cra/issues/135")) func stallsAreCountedByKindAndHeldMenusAreNotFreezes() {let r = Self.sampleReport()let m = r.mainThread#expect(m.freezes == 2)@@ -132,7 +132,7 @@ struct PerfStateTests {/// The schema as it ships: a change that moves or renames a field shows up here. Re-record with/// CRA_RECORD_GOLDEN=1 swift test --package-path Packages/CraCore, then say why in the PR.- @Test func reportMatchesTheGoldenFile() throws {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91"), .bug("https://github.com/VictorKildahl/cra/issues/135")) func reportMatchesTheGoldenFile() throws {let json = String(decoding: try PerfReport.encoder().encode(Self.sampleReport()), as: UTF8.self) + "\n"if ProcessInfo.processInfo.environment["CRA_RECORD_GOLDEN"] == "1" {let source = URL(fileURLWithPath: #filePath).deletingLastPathComponent().appendingPathComponent("Fixtures/Perf/perf-golden.json")@@ -199,7 +199,7 @@ struct PerfInsightTests {.insights.map(\.id) == ["stalls"])}- @Test func aShortIdleOrACheapRecorderSaysNothing() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/135")) func aShortIdleOrACheapRecorderSaysNothing() {#expect(report { $0.idle = PerfReport.Idle(samples: 11, cpuPct: 80); $0.selfCost.cpuPct = 0.1 }.insights.isEmpty)#expect(report { $0.idle = PerfReport.Idle(samples: 100, cpuPct: 9) }.insights.isEmpty)}diff --git a/Packages/CraCore/Tests/CraCoreTests/PermissionPromptTests.swift b/Packages/CraCore/Tests/CraCoreTests/PermissionPromptTests.swiftindex 13c28a3..1893bde 100644--- a/Packages/CraCore/Tests/CraCoreTests/PermissionPromptTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/PermissionPromptTests.swift@@ -21,7 +21,7 @@ struct PermissionPromptTests {// #137: Calendar's sheet said "is asking for a browser permission" for a type CraCEF// didn't map. Every type CraCEF maps is named.- @Test func chromesOtherTypesAreNamed() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/137")) func chromesOtherTypesAreNamed() {let calendar = "https://calendar.google.com/"#expect(PermissionPrompt.message(origin: calendar, kinds: 1 << 18) == "https://calendar.google.com/ wants to open a kind of link, like email or calendar links")#expect(PermissionPrompt.message(origin: calendar, kinds: 1 << 7) == "https://calendar.google.com/ wants to access other devices on your local network")@@ -32,7 +32,7 @@ struct PermissionPromptTests {}}- @Test func eachTypeHasItsOwnBit() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/137")) func eachTypeHasItsOwnBit() {let bits = PermissionPrompt.requests.map(\.kind)#expect(Set(bits).count == bits.count)#expect(bits.allSatisfy { $0.nonzeroBitCount == 1 && $0 & (1 | 2 | 4 | 16) == 0 })diff --git a/Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swift b/Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swiftindex 947b3d1..c845c16 100644--- a/Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swift@@ -6,7 +6,7 @@ import Testingstruct ProtectedMediaTests {let sites = ProtectedMediaSites()- @Test(arguments: [+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/66"), arguments: ["https://open.spotify.com/","https://open.spotify.com/track/1?si=x","https://www.netflix.com/browse",@@ -80,7 +80,7 @@ struct ProtectedMediaTests {}/// Prime Video where Amazon serves it, and Amazon Music; the rest of Amazon stays in Chromium.- @Test func amazon() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/66")) func amazon() {#expect(sites.engine(for: "https://www.amazon.com/gp/video/detail/B0X/ref=x?autoplay=1") == .webKit)#expect(sites.engine(for: "https://www.amazon.com/gp/video") == .webKit)#expect(sites.engine(for: "https://www.amazon.co.uk/gp/video/storefront") == .webKit)@@ -99,7 +99,7 @@ struct ProtectedMediaTests {}/// The Site Control Center's Safari's Engine switch: what Cra keeps after a choice.- @Test func choosingPerSite() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/66")) func choosingPerSite() {// A site off the list goes to WebKit, and back.var r = ProtectedMediaSites.choosing(.webKit, for: "https://www.viaplay.dk/film", added: [], removed: [])#expect(r.added == ["www.viaplay.dk"] && r.removed.isEmpty)@@ -150,7 +150,7 @@ struct ProtectedMediaTests {/// A Chromium page's own navigation to a service moves before the request goes out; a POST/// can't move its body, and a WebKit page never leaves by itself (sign-in round trips).- @Test func handoffRules() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/66")) func handoffRules() {#expect(sites.handoff(from: .chromium, to: "https://www.netflix.com/browse", method: "GET") == .webKit)#expect(sites.handoff(from: .chromium, to: "https://www.netflix.com/browse", method: "get") == .webKit)#expect(sites.handoff(from: .chromium, to: "https://open.spotify.com/callback", method: "POST") == nil)diff --git a/Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift b/Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swiftindex 4c320bf..4345492 100644--- a/Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift@@ -3,7 +3,7 @@ import Testing/// Chromium's secure DNS setting as the log and Export Diagnostics show it (#110).struct SecureDNSTests {- @Test(arguments: [+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/110"), arguments: [// Chromium's default, and Arc's: no provider, so the system resolver.("automatic", "", "automatic, no provider (system resolver)"),// What Chromium writes when Google is picked in chrome://settings/security.@@ -17,24 +17,24 @@ struct SecureDNSTests {#expect(SecureDNS(mode: mode, templates: templates).line == line)}- @Test func customTemplatesKeepOnlyTheirHost() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/110")) func customTemplatesKeepOnlyTheirHost() {let dns = SecureDNS(mode: "secure", templates: "https://dns.nextdns.io/a1b2c3/MacBook")#expect(dns.servers == ["dns.nextdns.io"])#expect(!dns.line.contains("a1b2c3"))}- @Test func severalTemplatesAreOneServerEach() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/110")) func severalTemplatesAreOneServerEach() {let dns = SecureDNS(mode: "secure", templates: "https://dns.google/dns-query{?dns}\nhttps://DNS.google/resolve https://dns.quad9.net/dns-query")#expect(dns.servers == ["dns.google", "dns.quad9.net"])}- @Test func aTemplateWithoutAHostIsNamedButNotShown() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/110")) func aTemplateWithoutAHostIsNamedButNotShown() {#expect(SecureDNS(mode: "secure", templates: "not a url/secret").line == "secure via a custom server")}// Settings ▸ Privacy ▸ Secure DNS (#133).- @Test func eachRowWritesWhatChromeWrites() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/133")) func eachRowWritesWhatChromeWrites() {#expect(SecureDNSPrefs(.automatic) == SecureDNSPrefs(mode: "automatic", templates: ""))#expect(SecureDNSPrefs(.off) == SecureDNSPrefs(mode: "off", templates: ""))let google = SecureDNSProvider.all[0]@@ -44,7 +44,7 @@ struct SecureDNSTests {#expect(SecureDNSPrefs(.custom, custom: "http://dns.example/dns-query") == nil)}- @Test func whatChromiumHoldsShowsAsItsRow() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/133")) func whatChromiumHoldsShowsAsItsRow() {#expect(SecureDNSPrefs(mode: "", templates: "").choice == .automatic)#expect(SecureDNSPrefs(mode: "automatic", templates: "").choice == .automatic)#expect(SecureDNSPrefs(mode: "automatic", templates: "https://dns.google/dns-query{?dns}").choice == .automatic)@@ -57,14 +57,14 @@ struct SecureDNSTests {#expect(SecureDNSPrefs(mode: "secure", templates: "").choice == .custom)}- @Test func everyProviderRoundTrips() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/133")) func everyProviderRoundTrips() {for p in SecureDNSProvider.all {#expect(SecureDNSPrefs(.provider(p))?.choice == .provider(p))#expect(SecureDNSPrefs.validTemplates(p.template) == p.template)}}- @Test(arguments: [+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/133"), arguments: [("https://dns.google/dns-query{?dns}", "https://dns.google/dns-query{?dns}"),("https://dns.nextdns.io/a1b2c3/My%20Mac", "https://dns.nextdns.io/a1b2c3/My%20Mac"),("HTTPS://dns.example:8443/q", "HTTPS://dns.example:8443/q"),@@ -74,7 +74,7 @@ struct SecureDNSTests {#expect(SecureDNSPrefs.validTemplates(text) == templates)}- @Test(arguments: [+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/133"), arguments: ["", " ", "dns.google", "http://dns.google/dns-query", "tls://dns.google", "https://","https:///dns-query", "https://user:[email protected]/q", "https://dns.example/q{?dns","https://dns.example/q}", "https://dns.google/dns-query http://plain.example/q",@@ -83,7 +83,7 @@ struct SecureDNSTests {#expect(SecureDNSPrefs.validTemplates(text) == nil)}- @Test func summaryNamesTheServerInEffect() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/133")) func summaryNamesTheServerInEffect() {#expect(SecureDNS(mode: "secure", templates: "https://dns.google/dns-query{?dns}").summary.contains("dns.google"))#expect(SecureDNS(mode: "automatic", templates: "").summary.hasPrefix("Automatic uses the network’s own resolver"))#expect(SecureDNS(mode: "off", templates: "").summary.contains("plain text"))diff --git a/Packages/CraCore/Tests/CraCoreTests/ShippedPlatformTests.swift b/Packages/CraCore/Tests/CraCoreTests/ShippedPlatformTests.swiftnew file mode 100644index 0000000..ac18539--- /dev/null+++ b/Packages/CraCore/Tests/CraCoreTests/ShippedPlatformTests.swift@@ -0,0 +1,36 @@+import CraCore+import Foundation+import Testing++/// What closed issues about privacy, profiles and performance shipped, where no older test+/// pinned it on its own.+struct ShippedPlatformTests {+ /// Settings ▸ Privacy ▸ Secure DNS (#133) lists Automatic, Off, then these providers in this+ /// order, each with the template chrome://settings/security writes for it, then Custom….+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/133"))+ func secureDNSMenuProviders() {+ #expect(SecureDNSProvider.all.map(\.name) == [+ "Google (Public DNS)", "Cloudflare (1.1.1.1)", "Quad9 (9.9.9.9)", "OpenDNS",+ "CleanBrowsing (Family Filter)", "DNS4EU (Protective)",+ ])+ #expect(SecureDNSProvider.all.allSatisfy { SecureDNSPrefs.validTemplates($0.template) == $0.template })+ }++ /// Settings ▸ Performance (#91) records from the first launch, with site names kept until+ /// "Hide site names" is ticked, and a settings file without the keys reads the same way.+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91"))+ func performanceRecordingIsOnByDefault() throws {+ let s = try JSONDecoder().decode(AppSettings.self, from: Data("{}".utf8))+ #expect(s.perfRecording && !s.perfHidesSiteNames)+ #expect(AppSettings().perfRecording && !AppSettings().perfHidesSiteNames)+ }++ /// The permission sheet (#137) names MIDI and the clipboard in Chrome's words, not as "a+ /// browser permission".+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/137"))+ func permissionSheetNamesMIDIAndTheClipboard() {+ let site = "https://synth.example/"+ #expect(PermissionPrompt.message(origin: site, kinds: 1 << 13) == "https://synth.example/ wants to control and reprogram your MIDI devices")+ #expect(PermissionPrompt.message(origin: site, kinds: 1 << 5) == "https://synth.example/ wants to see text and images copied to the clipboard")+ }+}diff --git a/Packages/CraCore/Tests/CraCoreTests/SiteNamesTests.swift b/Packages/CraCore/Tests/CraCoreTests/SiteNamesTests.swiftindex b16ae9a..e29fc3c 100644--- a/Packages/CraCore/Tests/CraCoreTests/SiteNamesTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/SiteNamesTests.swift@@ -12,7 +12,7 @@ struct SiteNamesTests {"tab sleep keeps NEWS.EXAMPLE.ORG awake: typed",]- @Test func everyHostOfTheSessionBecomesASiteNumber() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91")) func everyHostOfTheSessionBecomesASiteNumber() {var names = SiteNames(hosts: ["mail.example.com", "news.example.org", "intranet", "192.168.1.20"])let out = Self.files.map { names.apply($0) }.joined(separator: "\n")for host in ["mail.example.com", "news.example.org", "NEWS.EXAMPLE.ORG", "intranet", "192.168.1.20", "unknown.example.net"] {@@ -28,7 +28,7 @@ struct SiteNamesTests {#expect(out.contains("net::ERR_NAME_NOT_RESOLVED"))}- @Test func theSameSiteKeepsItsNameAcrossFiles() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/91")) func theSameSiteKeepsItsNameAcrossFiles() {var names = SiteNames(hosts: ["example.com"])#expect(names.apply("a example.com") == "a site-1")#expect(names.apply("b www.example.com.") == "b site-1.")diff --git a/Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift b/Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swiftindex f7e2703..229cea2 100644--- a/Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift+++ b/Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift@@ -15,7 +15,7 @@ struct TabSleepPolicyTests {/// A settings file without the keys is 0.1.28: 4 hours, the 10 tabs used last kept, no/// sweep for memory pressure.- @Test func defaultsAreArcs() throws {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153"), .bug("https://github.com/VictorKildahl/cra/issues/136")) func defaultsAreArcs() throws {let s = try JSONDecoder().decode(AppSettings.self, from: Data("{}".utf8))#expect(s.tabSleepTimerEnabled && s.tabSleepAfter == .fourHours && !s.tabSleepOnMemoryPressure)let policy = TabSleepPolicy.timer(s.tabSleepAfter)@@ -24,27 +24,27 @@ struct TabSleepPolicyTests {}/// 0.1.22–0.1.27 saved their own switch; it neither turns the clock off nor sets its time.- @Test func earlierSwitchIsIgnored() throws {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func earlierSwitchIsIgnored() throws {let json = #"{"tabSleepEnabled": false, "tabSleep": "fifteenMinutes"}"#let s = try JSONDecoder().decode(AppSettings.self, from: Data(json.utf8))#expect(s.tabSleepTimerEnabled && s.tabSleepAfter == .fourHours)}/// An unknown time (a later Cra's) falls back to 4 hours without resetting the file.- @Test func unknownTimeFallsBack() throws {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func unknownTimeFallsBack() throws {let json = #"{"tabSleepAfter": "fortnight", "searchEngine": "kagi"}"#let s = try JSONDecoder().decode(AppSettings.self, from: Data(json.utf8))#expect(s.tabSleepAfter == .fourHours && s.searchEngine == .kagi)}- @Test func thresholds() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func thresholds() {#expect(TabSleepThreshold.allCases.map(\.label) == ["15 minutes", "30 minutes", "1 hour", "2 hours", "4 hours", "8 hours"])#expect(TabSleepThreshold.allCases.map(\.seconds) == [900, 1800, 3600, 7200, 14400, 28800])}/// At 4 hours a page hidden 3 h 59 min stays and one hidden 4 h 1 min is a candidate, unless/// it is among the 10 tabs used last.- @Test func fourHoursKeepsTheTenUsedLast() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153"), .bug("https://github.com/VictorKildahl/cra/issues/136")) func fourHoursKeepsTheTenUsedLast() {let policy = TabSleepPolicy.timer(.fourHours)let p = pages(hiddenMinutesAgo: [239, 241])#expect(policy.candidates(p, visible: [visible], now: now) == [])@@ -54,28 +54,28 @@ struct TabSleepPolicyTests {#expect(policy.candidates(many, visible: [visible], now: now) == [many[12].id, many[11].id, many[10].id])}- @Test func eightHoursKeepsThemToo() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func eightHoursKeepsThemToo() {let p = pages(hiddenMinutesAgo: [9 * 60])#expect(TabSleepPolicy.timer(.eightHours).candidates(p, visible: [visible], now: now) == [])#expect(TabSleepPolicy.timer(.eightHours).candidates(p, visible: [visible], protectedRecent: 1, now: now) == [p[1].id])}/// Shorter than Arc's 4 hours, the 10 tabs used last are not kept: they hold the memory.- @Test func shortTimesCloseTheTenUsedLast() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func shortTimesCloseTheTenUsedLast() {let p = pages(hiddenMinutesAgo: [14, 16])#expect(TabSleepPolicy.timer(.fifteenMinutes).candidates(p, visible: [visible], now: now) == [p[2].id])#expect(!TabSleepPolicy.timer(.twoHours).keepsRecentTabs)}/// The tab on screen and both panes of a split are never candidates, whatever their dates.- @Test func visiblePagesStay() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func visiblePagesStay() {let split = TabSleepPolicy.Page(id: UUID(), hiddenAt: now.addingTimeInterval(-86400))let p = pages(hiddenMinutesAgo: []) + [split]#expect(TabSleepPolicy.memoryPressure.candidates(p, visible: [visible, split.id], now: now) == [])}/// A page that played sound waits as long after it went quiet as after it went out of sight.- @Test func recentlyAudibleStays() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func recentlyAudibleStays() {let id = UUID()let hidden = now.addingTimeInterval(-3600)let quiet2 = TabSleepPolicy.Page(id: id, hiddenAt: hidden, audibleAt: now.addingTimeInterval(-120))@@ -86,14 +86,14 @@ struct TabSleepPolicyTests {}/// Under pressure: oldest first, the 10 used last included, none left in the last 5 minutes.- @Test func pressureTakesTheOldestPastTheGrace() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func pressureTakesTheOldestPastTheGrace() {let policy = TabSleepPolicy.memoryPressure#expect(policy.limit == 3 && policy.reason == .memoryPressure)let p = pages(hiddenMinutesAgo: [4.98, 5.02, 30, 10])#expect(policy.candidates(p, visible: [visible], now: now) == [p[3].id, p[4].id, p[2].id])}- @Test func pressureSweepTiming() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func pressureSweepTiming() {#expect(!TabSleepPolicy.sweepsForPressure(.warning, enabled: false, lastSweep: nil, now: now))#expect(!TabSleepPolicy.sweepsForPressure(.normal, enabled: true, lastSweep: nil, now: now))#expect(!TabSleepPolicy.sweepsForPressure(.unknown, enabled: true, lastSweep: nil, now: now))@@ -105,7 +105,7 @@ struct TabSleepPolicyTests {/// Chromium's freezing reasons that keep a page from sleeping; the rest (a Web Lock, recently/// visible, notification permission) don't.- @Test func freezingReasonsThatKeepAPage() {+ @Test(.bug("https://github.com/VictorKildahl/cra/issues/153")) func freezingReasonsThatKeepAPage() {#expect(TabSleepPolicy.refusal(freezingReasons: ["has an active WebRTC connection", "holding Web Lock"]) == "call")#expect(TabSleepPolicy.refusal(freezingReasons: ["connected to USB device"]) == "device")#expect(TabSleepPolicy.refusal(freezingReasons: ["connected to serial port"]) == "device")diff --git a/Tests/BrowserManagerLifecycleTests.swift b/Tests/BrowserManagerLifecycleTests.swiftindex cae54df..5ca3da9 100644--- a/Tests/BrowserManagerLifecycleTests.swift+++ b/Tests/BrowserManagerLifecycleTests.swift@@ -318,6 +318,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #136/// A tab shown while its page loads is neither captured nor probed until the load is over/// (#136): both ask the renderer for work in the busiest second of the page.@MainActor@@ -384,6 +385,7 @@ enum BrowserManagerLifecycleTests {manager.runtime(for: id).map(\.discarded) ?? true}+ // promise: #136/// Like Arc, the 10 tabs used last keep their pages however long they have been hidden (#136).@MainActorprivate static func recentTabsCase() {@@ -400,6 +402,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #136/// Like Arc, a page out of sight past the threshold is voted to freeze unless it is one of/// the 10 tabs used last; showing it drops the vote (#136).@MainActor@@ -423,6 +426,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #32/// A page that refused isn't probed again every minute, only after the back-off or once shown again.@MainActorprivate static func refusalBackoffCase() async {@@ -443,6 +447,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #32/// Tab sleeping on the manager's clock: an hour's threshold and the 10-minute back-off run/// in no time, and nothing is asked a second early.@MainActor@@ -471,6 +476,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #153/// Under memory pressure (#153) the 3 pages hidden longest are asked, the 10 tabs used last/// included; a page refusing inside its back-off doesn't take one of the 3, and a page left/// less than 5 minutes ago isn't asked.@@ -501,6 +507,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #153/// Sleeping discards the page in place (#153): the runtime stays with Chromium's history and/// scroll position, showing the tab loads it now, and it holds none of the 10 recent places./// A call with camera and microphone off, or a device, keeps the page awake; a CEF without@@ -546,6 +553,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #153/// "Force tabs out of memory after:" below Arc's 4 hours closes the 10 tabs used last too;/// 4 hours and more keep them (#153).@MainActor@@ -564,6 +572,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #153/// A page that played sound counts as in use: tab sleeping waits as long after it went quiet/// as after it went out of sight (#153).@MainActor@@ -663,6 +672,7 @@ enum BrowserManagerLifecycleTests {manager.closeAll()}+ // promise: #32/// The page's own onbeforeunload, asked in its world after the isolated probe, keeps it awake.@MainActorprivate static func beforeUnloadCase() async {diff --git a/Tests/PerfTests.swift b/Tests/PerfTests.swiftindex 7117059..cb49871 100644--- a/Tests/PerfTests.swift+++ b/Tests/PerfTests.swift@@ -62,6 +62,7 @@ enum PerfTests {if x < 0 { print(x) }}+ // promise: #91@MainActor static func stallsAreRecordedWithTheirBreadcrumbs() {let c = config("stall")start(c)@@ -119,6 +120,7 @@ enum PerfTests {PerfRecorder.quit()}+ // promise: #91@MainActor static func aHangIsWrittenWhileItLastsWithItsStack() {let c = config("hang", hangMs: 600, stacks: 1)start(c)@@ -152,6 +154,7 @@ enum PerfTests {PerfRecorder.quit()}+ // promise: #91@MainActor static func aSessionThatNeverQuitIsAbnormalNextLaunch() {let c = config("abnormal")start(c)@@ -181,6 +184,7 @@ enum PerfTests {PerfRecorder.quit()}+ // promise: #91@MainActor static func aSecondCraWritesNothing() {let c = config("second")start(c, owner: false)@@ -191,6 +195,7 @@ enum PerfTests {expect(!FileManager.default.fileExists(atPath: c.folder.path), "not even when it quits")}+ // promise: #91@MainActor static func recordingOffStopsSamplingAndWriting() {let c = config("off")start(c, recording: false)@@ -258,6 +263,7 @@ enum PerfTests {PerfRecorder.quit()}+ // promise: #135/// GitHub #135: a timer and a queued block that run in one turn of the loop, with no sleep/// or commit between them, are one 300 ms pass. Split at before-timers they were two 150 ms/// halves and no stall at all. The timer queues the block: queued side by side, the block could@@ -283,6 +289,7 @@ enum PerfTests {PerfRecorder.quit()}+ // promise: #135/// GitHub #135: the first pass that lasts `slowStackMs` gets one `sample`, in memory, while the/// watchdog goes on watching; the report says how long the pass was in the end.@MainActor static func theFirstSlowPassGetsAStack() {diff --git a/Tests/Scenarios/accept-languages.scenario b/Tests/Scenarios/accept-languages.scenarioindex 69c3a9a..0adf0de 100644--- a/Tests/Scenarios/accept-languages.scenario+++ b/Tests/Scenarios/accept-languages.scenario@@ -1,3 +1,4 @@+# promise: #209# GitHub #209: the languages websites see (Accept-Language, navigator.languages) are each profile's# chrome://settings/languages, as in Chrome and Arc. Language Settings in the command bar opens that# page; a language added there reaches the open page at once and new pages too. Icelandic, whichdiff --git a/Tests/Scenarios/secure-dns-default.scenario b/Tests/Scenarios/secure-dns-default.scenarionew file mode 100644index 0000000..7e57445--- /dev/null+++ b/Tests/Scenarios/secure-dns-default.scenario@@ -0,0 +1,9 @@+# promise: #110+# Cra leaves Chromium's secure DNS setting at its default, as Arc does: automatic, with no DoH+# provider of its own, so the network's resolver (and split-horizon DNS at work) keeps working.+# cra.log says which mode is in effect at launch (#110). Settings ▸ Privacy ▸ Secure DNS (#133)+# changes it only when the user picks a provider.+fresh+budget rss=500 stalls50=5+expect-log secure dns: automatic, no provider \(system resolver\)+reject-log secure dns: (secure|off)diff --git a/Tests/Scenarios/space-profiles.scenario b/Tests/Scenarios/space-profiles.scenarionew file mode 100644index 0000000..f3a3cd7--- /dev/null+++ b/Tests/Scenarios/space-profiles.scenario@@ -0,0 +1,49 @@+# promise: #81 #131+# Each space's pages load in its profile's Chromium folder, with that profile's cookies, and a+# space on Default stays on Default after a relaunch whichever profile was used last (#81:+# Chromium otherwise started on Local State's profile.last_used). Personal is on Default,+# Random on the profile Hobbies, as in the report.+# A relaunched Cra's stdout isn't kept, so after the relaunch the page reports what it sees by+# going to <answer>.localhost, a host cra.log names. Only the name counts: the run lists localhost+# as a WebKit host, so that page moves to WebKit and fails to load there.+budget rss=700 stalls50=20+seed settings.json {"hasSeenImportPrompt": true, "toolbarDefaultMigrated": true}+seed sidebar.json {"version":1,"spaceOrder":["A0000000-0000-0000-0000-000000000001","A0000000-0000-0000-0000-000000000002"],"spaces":[{"id":"A0000000-0000-0000-0000-000000000001","title":"Personal","emoji":"🏠","favoritesContainerID":"C0000000-0000-0000-0000-000000000011","pinnedContainerID":"C0000000-0000-0000-0000-000000000012","todayContainerID":"C0000000-0000-0000-0000-000000000013","createdAt":"2026-11-06T08:00:00Z","theme":{"colors":["#8389FF","#8389FF"],"intensity":0.5,"noise":0,"appearance":"light","accent":"#8389FF","solid":true,"key":["#8389FF"]}},{"id":"A0000000-0000-0000-0000-000000000002","title":"Random","emoji":"🎲","favoritesContainerID":"C0000000-0000-0000-0000-000000000021","pinnedContainerID":"C0000000-0000-0000-0000-000000000022","todayContainerID":"C0000000-0000-0000-0000-000000000023","createdAt":"2026-11-06T08:00:00Z","profileID":"B0000000-0000-0000-0000-000000000001","theme":{"colors":["#8389FF","#8389FF"],"intensity":0.5,"noise":0,"appearance":"light","accent":"#8389FF","solid":true,"key":["#8389FF"]}}],"profiles":[{"id":"B0000000-0000-0000-0000-000000000001","name":"Hobbies"}],"items":[{"id":"C0000000-0000-0000-0000-000000000011","children":[],"isUnread":false,"createdAt":"2026-11-06T08:00:00Z","data":{"container":{"_0":{"favorites":{"spaceID":"A0000000-0000-0000-0000-000000000001"}}}}},{"id":"C0000000-0000-0000-0000-000000000012","children":[],"isUnread":false,"createdAt":"2026-11-06T08:00:00Z","data":{"container":{"_0":{"pinned":{"spaceID":"A0000000-0000-0000-0000-000000000001"}}}}},{"id":"C0000000-0000-0000-0000-000000000013","children":[],"isUnread":false,"createdAt":"2026-11-06T08:00:00Z","data":{"container":{"_0":{"today":{"spaceID":"A0000000-0000-0000-0000-000000000001"}}}}},{"id":"C0000000-0000-0000-0000-000000000021","children":[],"isUnread":false,"createdAt":"2026-11-06T08:00:00Z","data":{"container":{"_0":{"favorites":{"spaceID":"A0000000-0000-0000-0000-000000000002"}}}}},{"id":"C0000000-0000-0000-0000-000000000022","children":[],"isUnread":false,"createdAt":"2026-11-06T08:00:00Z","data":{"container":{"_0":{"pinned":{"spaceID":"A0000000-0000-0000-0000-000000000002"}}}}},{"id":"C0000000-0000-0000-0000-000000000023","children":[],"isUnread":false,"createdAt":"2026-11-06T08:00:00Z","data":{"container":{"_0":{"today":{"spaceID":"A0000000-0000-0000-0000-000000000002"}}}}}]}+pace 0.5++# Random (Hobbies): its own folder, and a cookie only it has.+cra://open?url=${PAGE}?n=random&space=A0000000-0000-0000-0000-000000000002+expect-log loaded 127\.0\.0\.1+cra://debug?cdp=Runtime.evaluate¶ms={"expression":"document.cookie='who=random; max-age=86400','random:'+document.cookie"}+expect-log Cra cdp Runtime.evaluate .*"value":"random:who=random"+cra://open?url=chrome://version&space=A0000000-0000-0000-0000-000000000002+wait 2+cra://debug?cdp=Runtime.evaluate¶ms={"expression":"'path:'+document.getElementById('profile_path').innerText.split('/').pop()"}+expect-log Cra cdp Runtime.evaluate .*"value":"path:Profile B0000000-0000-0000-0000-000000000001"++# Personal (Default): the Default folder, without Random's cookie.+cra://open?url=${PAGE}?n=personal&space=A0000000-0000-0000-0000-000000000001+expect-log loaded 127\.0\.0\.1+cra://debug?cdp=Runtime.evaluate¶ms={"expression":"document.cookie='who=personal; max-age=86400','personal:'+document.cookie"}+expect-log Cra cdp Runtime.evaluate .*"value":"personal:who=personal"+cra://open?url=chrome://version&space=A0000000-0000-0000-0000-000000000001+wait 2+cra://debug?cdp=Runtime.evaluate¶ms={"expression":"'path:'+document.getElementById('profile_path').innerText.split('/').pop()"}+expect-log Cra cdp Runtime.evaluate .*"value":"path:Default"++# Random used last, then a relaunch: a new page in Personal still has Personal's cookie.+cra://open?url=${PAGE}?n=random-last&space=A0000000-0000-0000-0000-000000000002+expect-log loaded 127\.0\.0\.1+wait 2+relaunch+cra://open?url=${PAGE}?n=after&space=A0000000-0000-0000-0000-000000000001+wait 3+cra://debug?pageJS=location.href=location.href.replace('127.0.0.1','after-'+(document.cookie.replace(/[^a-z0-9]+/g,'-')||'none')+'.localhost')+expect-log for after-[a-z0-9-]+\.localhost+expect-log for after-who-personal\.localhost+# And Random still has its own, kept on disk in its profile's folder.+cra://open?url=${PAGE}?n=again&space=A0000000-0000-0000-0000-000000000002+wait 3+cra://debug?pageJS=location.href=location.href.replace('127.0.0.1','again-'+(document.cookie.replace(/[^a-z0-9]+/g,'-')||'none')+'.localhost')+expect-log for again-[a-z0-9-]+\.localhost+expect-log for again-who-random\.localhostdiff --git a/Tests/Scenarios/tab-sleep-probe.scenario b/Tests/Scenarios/tab-sleep-probe.scenarionew file mode 100644index 0000000..52f212b--- /dev/null+++ b/Tests/Scenarios/tab-sleep-probe.scenario@@ -0,0 +1,34 @@+# promise: #32+# Tab sleeping asks a hidden page whether it is in use, and only the user's own typing or the+# page's own onbeforeunload says yes (#32). A field a script fills (with its input event) and a+# beforeunload listener added with addEventListener don't keep a page awake; text typed into a+# field does, and the log says why. Typing comes from DevTools' Input.insertText, a trusted input+# event as a key press's is, so no keys reach the Mac.+budget rss=800 stalls50=30+pace 0.5++# A page whose framework fills a field and listens for beforeunload: it sleeps.+cra://open?url=${PAGE}?n=scripted+expect-log loaded 127\.0\.0\.1+cra://debug?cdp=Runtime.evaluate¶ms={"expression":"(i=>{i.value='set by the page';i.dispatchEvent(new Event('input',{bubbles:true}));addEventListener('beforeunload',e=>{e.preventDefault()});return 'scripted:'+i.value})(document.querySelector('input'))"}+expect-log Cra cdp Runtime.evaluate .*"value":"scripted:set by the page"+cra://open?url=${PAGE}?n=front+expect-log loaded 127\.0\.0\.1+wait 2+cra://debug?sleepTabs=1+expect-log tab sleep (unloads|discards) 127\.0\.0\.1+reject-log tab sleep keeps 127\.0\.0\.1 awake++# A page with text the user typed: it stays awake, and the log names the reason once.+cra://open?url=${PAGE}?n=typed+expect-log loaded 127\.0\.0\.1+cra://debug?cdp=Runtime.evaluate¶ms={"expression":"document.querySelector('input').focus(),'focused:'+(document.activeElement.tagName)"}+expect-log Cra cdp Runtime.evaluate .*"value":"focused:INPUT"+cra://debug?cdp=Input.insertText¶ms={"text":"a draft"}+cra://debug?cdp=Runtime.evaluate¶ms={"expression":"'typed:'+document.querySelector('input').value"}+expect-log Cra cdp Runtime.evaluate .*"value":"typed:a draft"+cra://open?url=${PAGE}?n=front2+expect-log loaded 127\.0\.0\.1+wait 2+cra://debug?sleepTabs=1+expect-log tab sleep keeps 127\.0\.0\.1 awake: typeddiff --git a/Tests/Scenarios/webkit-drm-tabs.scenario b/Tests/Scenarios/webkit-drm-tabs.scenarioindex 4c353b7..79b9213 100644--- a/Tests/Scenarios/webkit-drm-tabs.scenario+++ b/Tests/Scenarios/webkit-drm-tabs.scenario@@ -1,3 +1,4 @@+# promise: #66# DRM services open in WebKit, where Apple's FairPlay plays them (ProtectedMediaSites,# docs/protected-media.md). ${WEBKIT} is the fixture server as localhost, which this run lists as# such a service, so the journey needs no network and no account. A Chromium page answersdiff --git a/Tests/StoreTests.swift b/Tests/StoreTests.swiftindex d9fd62f..be39f88 100644--- a/Tests/StoreTests.swift+++ b/Tests/StoreTests.swift@@ -23,6 +23,7 @@ enum StoreTests {chromiumProfile()autoArchive()tabSleepCadence()+ tabRestTimes()integrity()liveFolderExpiry()liveFolderSignIn()@@ -75,6 +76,7 @@ enum StoreTests {arcProfiles(plan: plan, store: composition.store)}+ // promise: #131/// Arc's spaces keep their profiles (GitHub #131): Work is on "Profile 2", named Client.@MainActorprivate static func arcProfiles(plan: ImportPlan, store: SidebarStore) {@@ -110,6 +112,7 @@ enum StoreTests {rebuildFromArc(plan: plan)}+ // promise: #131/// Rebuild from Arc (#131): a sidebar imported before profiles came over gets them afterwards.@MainActorprivate static func rebuildFromArc(plan: ImportPlan) {@@ -128,6 +131,7 @@ enum StoreTests {expect(store.arcProfileMoves(plan).isEmpty, "a second rebuild finds nothing to move")}+ // promise: #131/// A profile Chromium hasn't opened gets its sign-in databases with Default's schema (#131).private static func newProfileDatabases() {let root = FileManager.default.temporaryDirectory.appendingPathComponent("cra-db-\(UUID().uuidString)", isDirectory: true)@@ -234,6 +238,7 @@ enum StoreTests {expect(!archived(later.id), "with auto-archive off nothing is archived")}+ // promise: #136/// Tab sleeping asks the windows once a minute; like Arc, it has no switch.@MainActorprivate static func tabSleepCadence() {@@ -251,6 +256,17 @@ enum StoreTests {expect(clock.pendingCount == 2, "starting again replaces the timers instead of adding to them")}+ // promise: #136+ /// Tabs rest on Arc 1.171's own numbers (#136): a page out of sight 30 minutes is voted to+ /// freeze, one out of sight 4 hours sleeps, and the 10 tabs used last are never touched.+ private static func tabRestTimes() {+ expect(AppComposition.tabFreezeAfter == 30 * 60, "a hidden page is voted to freeze after 30 minutes, Arc's timeToFreezeTab")+ expect(TabSleepPolicy.timer(AppSettings().tabSleepAfter).hiddenFor == 4 * 3600 && AppSettings().tabSleepTimerEnabled,+ "a hidden page sleeps after 4 hours, with no setting to turn on, Arc's timeToDiscardTab")+ expect(TabSleepPolicy.protectedRecentTabs == 10 && TabSleepPolicy.timer(AppSettings().tabSleepAfter).keepsRecentTabs,+ "the 10 tabs used last keep their pages, Arc's protectedLRUTabCount")+ }+/// The integrity check stays quiet through ordinary changes and names a broken link.@MainActorprivate static func integrity() {diff --git a/Tests/promises.lock b/Tests/promises.lockindex b0f703d..6311562 100644--- a/Tests/promises.lock+++ b/Tests/promises.lock@@ -20,6 +20,10 @@#30 Packages/CraCore/Tests/CraCoreTests/ArcThemeImportTests.swift::unknownStyleFallsBackToThePalettesMidTone 33d9d79c196b#30 Tests/Scenarios/solid-spaces.scenario 69283ced9624#30 Tests/StoreTests.swift::arcSpacesWithoutAThemeShareOneDefault f642318e5d34+#32 Tests/BrowserManagerLifecycleTests.swift::beforeUnloadCase 973ade9207f7+#32 Tests/BrowserManagerLifecycleTests.swift::refusalBackoffCase 2043060d6237+#32 Tests/BrowserManagerLifecycleTests.swift::sleepClockCase d4f708c0529e+#32 Tests/Scenarios/tab-sleep-probe.scenario 2328ea8f721b#33 Tests/BrowserManagerLifecycleTests.swift::nowPlayingCase 896f39d0c04e#33 Tests/BrowserManagerLifecycleTests.swift::nowPlayingSkipsPictureInPictureCase df2bec09cf49#33 Tests/BrowserManagerLifecycleTests.swift::playerMediaSessionCase 70013060dd84@@ -44,12 +48,18 @@#50 Tests/CommandBarGlyphTests.swift::leadingGlyph 3e90bfdbd048#50 Tests/Scenarios/toolbar-chrome.scenario 1fa8505c4e49#54 Tests/StoreTests.swift::pinnedURL 83caea3b3e16+#66 Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swift::amazon f0a6891cac93+#66 Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swift::choosingPerSite ce4dddce6977+#66 Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swift::handoffRules 6eea8116562b+#66 Packages/CraCore/Tests/CraCoreTests/ProtectedMediaTests.swift::servicesOpenInWebKit 1f4f8537772e+#66 Tests/Scenarios/webkit-drm-tabs.scenario 0c04612b16e0#80 Packages/CraCore/Tests/CraCoreTests/DisplayDiagnosticsTests.swift::differentTopRatesAreMixed e6736f0fff82#80 Packages/CraCore/Tests/CraCoreTests/DisplayDiagnosticsTests.swift::fixedRateDisplayShowsOneRate 7c3babaccb16#80 Packages/CraCore/Tests/CraCoreTests/DisplayDiagnosticsTests.swift::intervalsBecomeWholeHertz 7fba8a629c39#80 Packages/CraCore/Tests/CraCoreTests/DisplayDiagnosticsTests.swift::sameTopRateOrUnknownIsNotMixed c1cf7d725296#80 Packages/CraCore/Tests/CraCoreTests/DisplayDiagnosticsTests.swift::variableRateDisplayShowsItsRange bd4f54224644#80 Tests/BrowserManagerLifecycleTests.swift::pageProbeCase 6cd5b47ee6e3+#81 Tests/Scenarios/space-profiles.scenario 9ca615fdf045#82 Tests/FloatingSidebarTests.swift::onlyTheKeyWindowReveals e03736669b48#83 Packages/CraCore/Tests/CraCoreTests/SidebarBackdropTests.swift::fullscreenSwapsTheBlurForTheDesktopTint dbfce1b4413d#83 Packages/CraCore/Tests/CraCoreTests/SidebarBackdropTests.swift::lightVibrantThemesKeepTheirCalibration 71fe23c0c000@@ -82,6 +92,19 @@#90 Packages/CraCore/Tests/CraCoreTests/ConnectionSecurityTests.swift::plainHTTPIsNotSecure e1b56792e997#90 Packages/CraCore/Tests/CraCoreTests/ConnectionSecurityTests.swift::revocationThatCannotBeCheckedIsNotAnError 3b4555d9f8dd#90 Packages/CraCore/Tests/CraCoreTests/ConnectionSecurityTests.swift::withoutAStatusTheSchemeDecides 33fb05d91a90+#91 Packages/CraCore/Tests/CraCoreTests/PerfSessionTests.swift::aMarkerLeftBehindIsAnAbnormalEnd ad8fa40df992+#91 Packages/CraCore/Tests/CraCoreTests/PerfSessionTests.swift::onlyTheOwnerWritesAndOnlyWhileRecording 41c0e8787da8+#91 Packages/CraCore/Tests/CraCoreTests/PerfSessionTests.swift::recordingFollowsTheSettingUnlessTheEnvironmentTurnsItOff ea1ec88d4757+#91 Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift::reportMatchesTheGoldenFile de1fcab25a26+#91 Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift::stallsAreCountedByKindAndHeldMenusAreNotFreezes 128d23a62afd+#91 Packages/CraCore/Tests/CraCoreTests/ShippedPlatformTests.swift::performanceRecordingIsOnByDefault 259e604ae88e+#91 Packages/CraCore/Tests/CraCoreTests/SiteNamesTests.swift::everyHostOfTheSessionBecomesASiteNumber af4a0eac908c+#91 Packages/CraCore/Tests/CraCoreTests/SiteNamesTests.swift::theSameSiteKeepsItsNameAcrossFiles c407e12b2fe9+#91 Tests/PerfTests.swift::aHangIsWrittenWhileItLastsWithItsStack 37bfa3d1acf6+#91 Tests/PerfTests.swift::aSecondCraWritesNothing 04cba6852f8e+#91 Tests/PerfTests.swift::aSessionThatNeverQuitIsAbnormalNextLaunch 09333be9e42e+#91 Tests/PerfTests.swift::recordingOffStopsSamplingAndWriting cfed737c8876+#91 Tests/PerfTests.swift::stallsAreRecordedWithTheirBreadcrumbs 32182f661f0d#92 Packages/CraCore/Tests/CraCoreTests/SpaceWindowTests.swift::aWindowShowingTheSpaceTakesThePage 390d2d0bee66#92 Packages/CraCore/Tests/CraCoreTests/SpaceWindowTests.swift::otherwiseTheWindowInUseLastSwitches 2d5ce0f25d2c#92 Packages/CraCore/Tests/CraCoreTests/SpaceWindowTests.swift::severalWindowsOnTheSpace 05f1c8e148fa@@ -135,9 +158,31 @@#107 Packages/CraCore/Tests/CraCoreTests/PinnedExtensionsTests.swift::profileListsRoundTrip 7a57b17d2767#107 Packages/CraCore/Tests/CraCoreTests/PinnedExtensionsTests.swift::removedExtensionsLeaveEveryList db169d3fdc84#107 Packages/CraCore/Tests/CraCoreTests/PinnedExtensionsTests.swift::unreadableFileMeansNoPins 8a2abe27ded2+#110 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::aTemplateWithoutAHostIsNamedButNotShown 756f41421548+#110 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::customTemplatesKeepOnlyTheirHost fd28b95e0a33+#110 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::line fe1dcfb4701b+#110 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::severalTemplatesAreOneServerEach dc2fe791c93f+#110 Tests/Scenarios/secure-dns-default.scenario 1042904fb8ce+#131 Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift::arcSpaceProfiles c9cf90d32a72+#131 Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift::commandLineFollowsTheLoadExtensionOrder eb3441dc88ab+#131 Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift::importedExtensionsGoWhereTheirProfilesWent 689676ea4e95+#131 Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift::importedPinsSeedOnlyNewLists c959ca5560a7+#131 Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift::rebuildKeepsExtensionsInProfilesMadeInCra 02966012603d+#131 Packages/CraCore/Tests/CraCoreTests/ExtensionProfilesTests.swift::rebuildMatchesSpacesByName 5db767db6157+#131 Tests/Scenarios/space-profiles.scenario 9ca615fdf045+#131 Tests/StoreTests.swift::arcProfiles 5e32237de12a+#131 Tests/StoreTests.swift::newProfileDatabases 02fece3b6212+#131 Tests/StoreTests.swift::rebuildFromArc 616b2788438a#132 Packages/CraCore/Tests/CraCoreTests/SidebarBackdropTests.swift::fullscreenSwapsTheBlurForTheDesktopTint dbfce1b4413d#132 Packages/CraCore/Tests/CraCoreTests/SidebarBackdropTests.swift::logLineNamesTheState 16b128ce2bbf#132 Packages/CraCore/Tests/CraCoreTests/SidebarBackdropTests.swift::solidThemesBlurWhileActiveAndGoFlatWhileInactive d974cca84f6e+#133 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::customTemplatesKeepTheirPath f08aa19365cb+#133 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::customTemplatesMustBeHTTPS e9d843c17592+#133 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::eachRowWritesWhatChromeWrites ac682ed5cdfb+#133 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::everyProviderRoundTrips 3c5c4c56ebaa+#133 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::summaryNamesTheServerInEffect c37d872e65c1+#133 Packages/CraCore/Tests/CraCoreTests/SecureDNSTests.swift::whatChromiumHoldsShowsAsItsRow 0fabb9471121+#133 Packages/CraCore/Tests/CraCoreTests/ShippedPlatformTests.swift::secureDNSMenuProviders d9c1a4c7fbfd#134 Packages/CraCore/Tests/CraCoreTests/PictureInPictureGestureTests.swift::aClickThatDriftsMovesNothing 991f7abe07c1#134 Packages/CraCore/Tests/CraCoreTests/PictureInPictureGestureTests.swift::aCornerFollowsTheLongerWay 03176a7ecc35#134 Packages/CraCore/Tests/CraCoreTests/PictureInPictureGestureTests.swift::aDragStaysADrag ffed99ac7e2c@@ -145,6 +190,21 @@#134 Packages/CraCore/Tests/CraCoreTests/PictureInPictureGestureTests.swift::resizeKeepsTheOppositeSideFixed fba1f3cef683#134 Packages/CraCore/Tests/CraCoreTests/PictureInPictureGestureTests.swift::resizeStaysWithinTheLimits a50c51c99293#134 Packages/CraCore/Tests/CraCoreTests/PictureInPictureGestureTests.swift::theMiddleMovesTheWindow fd4ee818984b+#135 Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift::aShortIdleOrACheapRecorderSaysNothing 6e577e54292b+#135 Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift::reportMatchesTheGoldenFile de1fcab25a26+#135 Packages/CraCore/Tests/CraCoreTests/PerfStateTests.swift::stallsAreCountedByKindAndHeldMenusAreNotFreezes 128d23a62afd+#135 Tests/PerfTests.swift::theFirstSlowPassGetsAStack ebe2a46b43da+#135 Tests/PerfTests.swift::workAcrossATimerBoundaryIsOnePass f398d95a67d4+#136 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::defaultsAreArcs 2eed7b4fce3e+#136 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::fourHoursKeepsTheTenUsedLast 727fd73ab07f+#136 Tests/BrowserManagerLifecycleTests.swift::freezingVoteCase edf0a4d06cf6+#136 Tests/BrowserManagerLifecycleTests.swift::loadingTabCase 49ae346fce0b+#136 Tests/BrowserManagerLifecycleTests.swift::recentTabsCase 72d6480042f0+#136 Tests/StoreTests.swift::tabRestTimes ca5370f5f3ea+#136 Tests/StoreTests.swift::tabSleepCadence f5a45c18cee9+#137 Packages/CraCore/Tests/CraCoreTests/PermissionPromptTests.swift::chromesOtherTypesAreNamed 7db5fa9901b6+#137 Packages/CraCore/Tests/CraCoreTests/PermissionPromptTests.swift::eachTypeHasItsOwnBit 05dc9d8f3bd1+#137 Packages/CraCore/Tests/CraCoreTests/ShippedPlatformTests.swift::permissionSheetNamesMIDIAndTheClipboard 5c70fda1e187#138 Tests/BrowserManagerLifecycleTests.swift::devToolsCase 76008e9b3836#138 Tests/PolicyTests.swift::devToolsToggle 5786fe494c6e#139 Packages/CraCore/Tests/CraCoreTests/SidebarCloseTests.swift::commandW 7dbc0ee8396c@@ -157,6 +217,22 @@#152 Packages/CraCore/Tests/CraCoreTests/ThemeTonesTests.swift::shadedDarkKeepsTheHueAtTenPercentLuminance 5f3b98ef816d#152 Packages/CraCore/Tests/CraCoreTests/ThemeTonesTests.swift::tonesAreArcsPaletteSlots 53cd2a932167#152 Packages/CraCore/Tests/CraCoreTests/ThemeTonesTests.swift::victorsThemeRebuildsArcsShade 2d1eddcfe6e1+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::defaultsAreArcs 2eed7b4fce3e+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::earlierSwitchIsIgnored e76746fb1993+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::eightHoursKeepsThemToo b3da3d8b8221+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::fourHoursKeepsTheTenUsedLast 727fd73ab07f+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::freezingReasonsThatKeepAPage 2a05a12e53eb+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::pressureSweepTiming f737bdbb7c53+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::pressureTakesTheOldestPastTheGrace 1561f645c0a9+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::recentlyAudibleStays eca0c536d588+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::shortTimesCloseTheTenUsedLast 265e87cd7a23+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::thresholds 7e443a1abcb3+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::unknownTimeFallsBack 57fecfb31c5a+#153 Packages/CraCore/Tests/CraCoreTests/TabSleepPolicyTests.swift::visiblePagesStay 37235e5f2aa5+#153 Tests/BrowserManagerLifecycleTests.swift::discardCase 0646d074a745+#153 Tests/BrowserManagerLifecycleTests.swift::pressureSweepCase dd5c8b3270f0+#153 Tests/BrowserManagerLifecycleTests.swift::recentlyAudibleCase 1d3a7c7d2db1+#153 Tests/BrowserManagerLifecycleTests.swift::shortTimerCase a9d9c860bc51#154 Packages/CraCore/Tests/CraCoreTests/FavoritesSharingTests.swift::aProfilesListIsReused 56b12941287c#154 Packages/CraCore/Tests/CraCoreTests/FavoritesSharingTests.swift::eachProfileGetsOneListOfItsSpacesFavorites 5ef6f88b9e36#154 Packages/CraCore/Tests/CraCoreTests/FavoritesSharingTests.swift::keys c19e757f0423@@ -178,6 +254,8 @@#156 Packages/CraCore/Tests/CraCoreTests/SidebarBackdropTests.swift::logLineNamesTheState 16b128ce2bbf#156 Packages/CraCore/Tests/CraCoreTests/SidebarBackdropTests.swift::reduceTransparencyNeverShowsACapture af6fa6d2d572#157 Tests/StoreTests.swift::favoritesEmptyState d14897207ce4+#167 Packages/CraCore/Tests/CraCoreTests/ChromiumLocaleTests.swift::followsMacOS 98d684681e79+#167 Packages/CraCore/Tests/CraCoreTests/ChromiumLocaleTests.swift::noLocalesLeavesCEFsDefault 5aaf38691e83#168 Tests/Scenarios/open-in-space.scenario 9f2fdc2279a0#170 Packages/CraCore/Tests/CraCoreTests/ShippedThemesTests.swift::newSpaceStartsOnOneBrandColour 37cb20e10c4b#170 Packages/CraCore/Tests/CraCoreTests/ShippedThemesTests.swift::oneColourIsSavedLikeAnArcSingleImport c847f6695226@@ -210,6 +288,10 @@#183 Packages/CraCore/Tests/CraCoreTests/ShippedSidebarTests.swift::backgroundLinksSettingIsKept f4c02e2bd336#185 Packages/CraCore/Tests/CraCoreTests/SidebarModelTests.swift::developerBarShowsWithTheToolbarHidden 20670c4040fc#185 Tests/Scenarios/developer-bar.scenario 7e0621dd18c1+#190 Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swift::aMissingFolderFallsBackToDownloads f5a843595618+#190 Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swift::eachProfileKeepsItsOwn f394f179f5ba+#190 Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swift::goingBackToTheDefaultDropsTheEntry 96fe0ad9a50b+#190 Packages/CraCore/Tests/CraCoreTests/DownloadLocationTests.swift::profilesWithoutAChoiceUseDownloadsWithoutAsking ffef7f30e25f#191 Tests/StoreTests.swift::dropOnPinnedTabSplits ac72302089d5#195 Packages/CraCore/Tests/CraCoreTests/ActionSearchScopeTests.swift::barOpenersAreLeftOut 1a36c34470fb#195 Packages/CraCore/Tests/CraCoreTests/ActionSearchScopeTests.swift::nothingTypedListsByUseThenMenuOrder 55375f23aad1@@ -240,3 +322,8 @@#205 Packages/CraCore/Tests/CraCoreTests/SpaceIconTests.swift::iconsNeverStack 7ffc5abe0004#205 Packages/CraCore/Tests/CraCoreTests/SpaceIconTests.swift::readingTheStoredPair 517e549811b6#205 Packages/CraCore/Tests/CraCoreTests/SpaceIconTests.swift::savingTheIconItReadsChangesNothing d7e745d4f478+#209 Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swift::dropsWhatIsNotALanguageList 92f271a1ba67+#209 Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swift::namesLanguagesInEnglish 11c15535bb75+#209 Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swift::readsAProfilesPreferencesFile 1c42ec3c75b3+#209 Packages/CraCore/Tests/CraCoreTests/BrowserLanguagesTests.swift::readsThePrefAsChromiumListsIt d7fa1a3f36a4+#209 Tests/Scenarios/accept-languages.scenario 6ca3402ebe15diff --git a/scripts/scenario.sh b/scripts/scenario.shindex eeb184e..6b6af88 100755--- a/scripts/scenario.sh+++ b/scripts/scenario.sh@@ -65,7 +65,9 @@ fiOUT="$ROOT/build/scenarios/$NAME${CRA_FLAGS:+-${CRA_FLAGS//[^a-z]/}}"rm -rf "$OUT" && mkdir -p "$OUT"-DATA="$(mktemp -d /tmp/cra-scenario.XXXXXX)"+# The physical path: /tmp is a link to /private/tmp, and CEF takes a profile's folder for one+# outside root_cache_path through it (in-memory storage instead), so spaces on a profile need it.+DATA="$(cd "$(mktemp -d /tmp/cra-scenario.XXXXXX)" && pwd -P)"CMD="$OUT/commands"HITCH="$OUT/hitch.log"LOG="$DATA/cra.log"