This repository has been archived by the owner. It is now read-only.
Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
625 additions
and 1 deletion.
- +409 −1 Client.xcodeproj/project.pbxproj
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Account.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Fennec.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Fennec_Enterprise.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Fennec_Enterprise_UITests.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Fennec_Enterprise_XCUITests.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Fennec_Enterprise_XCUITests_iPad.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Firefox.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/FirefoxBeta.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Ghostery.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Shared.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Storage.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Sync.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Telemetry.xcscheme
- +10 −0 Client.xcodeproj/xcshareddata/xcschemes/Today.xcscheme
- +22 −0 UnitTests/Info.plist
- +54 −0 UnitTests/LogoLoaderTests.swift
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>CFBundleDevelopmentRegion</key> | ||
| <string>$(DEVELOPMENT_LANGUAGE)</string> | ||
| <key>CFBundleExecutable</key> | ||
| <string>$(EXECUTABLE_NAME)</string> | ||
| <key>CFBundleIdentifier</key> | ||
| <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| <key>CFBundleInfoDictionaryVersion</key> | ||
| <string>6.0</string> | ||
| <key>CFBundleName</key> | ||
| <string>$(PRODUCT_NAME)</string> | ||
| <key>CFBundlePackageType</key> | ||
| <string>BNDL</string> | ||
| <key>CFBundleShortVersionString</key> | ||
| <string>1.0</string> | ||
| <key>CFBundleVersion</key> | ||
| <string>1</string> | ||
| </dict> | ||
| </plist> |
| @@ -0,0 +1,54 @@ | ||
| // | ||
| // LogoLoaderTests.swift | ||
| // AppiumTests | ||
| // | ||
| // Created by Mahmoud Adam on 9/14/18. | ||
| // Copyright © 2018 Cliqz. All rights reserved. | ||
| // | ||
| import XCTest | ||
| @testable import Client | ||
|
|
||
| class LogoLoaderTests: XCTestCase { | ||
|
|
||
| override func setUp() { | ||
| super.setUp() | ||
| // Put setup code here. This method is called before the invocation of each test method in the class. | ||
| } | ||
|
|
||
| override func tearDown() { | ||
| // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
| super.tearDown() | ||
| } | ||
|
|
||
| func testDomains() { | ||
| XCTAssertTrue(LogoLoader.domainName("http://abc.go.com") == "go", "domain for http://abc.go.com != go") | ||
| XCTAssertTrue(LogoLoader.domainName("http://m.facebook.com") == "facebook", "domain for http://m.facebook.com != facebook") | ||
| XCTAssertTrue(LogoLoader.domainName("http://direct.gov.uk") == "direct", "domain for http://direct.gov.uk != direct") | ||
| XCTAssertTrue(LogoLoader.domainName("http://images.google.com") == "google", "domain for http://images.google.com != google") | ||
| XCTAssertTrue(LogoLoader.domainName("http://images.google.com.eg") == "google", "domain for http://images.google.com.eg != google") | ||
| XCTAssertTrue(LogoLoader.domainName("http://bbc.co.uk") == "bbc", "domain for http://bbc.co.uk != bbc") | ||
| } | ||
|
|
||
| func testFacebookMobileLogoDetails() { | ||
| let logoDetails = LogoLoader.fetchLogoDetails("http://m.facebook.com") | ||
| XCTAssertTrue(logoDetails.hostName == "facebook", "Host name for http://m.facebook.com != facebook") | ||
| } | ||
|
|
||
| func testGoogleImagesLogoDetails() { | ||
| let logoDetails = LogoLoader.fetchLogoDetails("http://images.google.com") | ||
| XCTAssertTrue(logoDetails.hostName == "images.google", "Host name for http://images.google.com != images.google") | ||
| } | ||
|
|
||
|
|
||
| func testAbcGoLogoDetails() { | ||
| let logoDetails = LogoLoader.fetchLogoDetails("http://abc.go.com") | ||
| XCTAssertTrue(logoDetails.hostName == "abc.go", "Host name for http://abc.go.com != abc.go") | ||
| } | ||
|
|
||
| func testBbcLogoDetails() { | ||
| let logoDetails = LogoLoader.fetchLogoDetails("http://bbc.co.uk") | ||
| XCTAssertTrue(logoDetails.hostName == "bbc", "Host name for http://bbc.co.uk != bbc") | ||
| } | ||
|
|
||
| } |