Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ public struct BrowserImportBrowserDescriptor: Hashable, Sendable {
dataArtifactRelativePaths: [],
supportsDataOnlyDetection: true
),
BrowserImportBrowserDescriptor(
id: "aside",
displayName: "Aside",
family: .chromium,
tier: 2,
bundleIdentifiers: ["at.studio.AsideBrowser"],
appNames: ["Aside.app"],
dataRootRelativePaths: ["Library/Application Support/Aside"],
dataArtifactRelativePaths: [],
supportsDataOnlyDetection: true
),
BrowserImportBrowserDescriptor(
id: "perplexity-comet",
displayName: "Perplexity Comet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,50 @@ struct BrowserInstalledBrowserDetectorTests {
#expect(dia.profiles.map(\.rootURL.lastPathComponent) == ["Default", "Profile 1"])
}

@Test("detects Aside Chromium profiles")
func detectsAsideProfiles() throws {
let home = try makeTempHome()
defer { try? FileManager.default.removeItem(at: home) }

let asideRoot = home
.appendingPathComponent("Library/Application Support/Aside", isDirectory: true)
let defaultProfile = asideRoot.appendingPathComponent("Default", isDirectory: true)
try FileManager.default.createDirectory(at: defaultProfile, withIntermediateDirectories: true)
try Data().write(to: defaultProfile.appendingPathComponent("History"))
try Data().write(to: defaultProfile.appendingPathComponent("Cookies"))
try Data(
"""
{
"profile": {
"info_cache": {
"Default": {
"name": "Personal"
}
}
}
}
""".utf8
).write(to: asideRoot.appendingPathComponent("Local State"))

let fakeApp = home.appendingPathComponent("Aside.app", isDirectory: true)
let detector = BrowserInstalledBrowserDetector(
homeDirectoryURL: home,
bundleLookup: { bundleID in
bundleID == "at.studio.AsideBrowser" ? fakeApp : nil
},
Comment on lines +115 to +117

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Data-only path remains untested

The test always returns a fake installed app, so it never exercises the data-only behavior enabled by supportsDataOnlyDetection. If that flag is removed or disabled, this test still passes even though users with retained Aside data but no installed application can no longer import it. Use a nil bundle lookup or add a separate data-only case.

applicationSearchDirectories: [],
fileManager: .default
)

let aside = try #require(detector.detectInstalledBrowsers().first { $0.id == "aside" })
#expect(aside.displayName == "Aside")
#expect(aside.family == .chromium)
#expect(aside.appURL == fakeApp)
#expect(aside.dataRootURL == asideRoot)
#expect(aside.profiles.map(\.displayName) == ["Personal"])
#expect(aside.profiles.first?.isDefault == true)
}

@Test("detects Arc Chromium profiles and Network cookie stores under User Data")
func detectsArcProfilesUnderUserData() throws {
let home = try makeTempHome()
Expand Down
Loading