<commit_before>//
//  WebViewControllerDelegateTests.swift
//  ELHybridWeb
//
//  Created by <NAME> on 5/20/15.
//  Copyright (c) 2015 WalmartLabs. All rights reserved.
//

import UIKit
import XCTest
import ELHybridWeb
import ELJSBridge

class WebViewControllerDelegateTests: XCTestCase, WebViewControllerDelegate {
    
    var didStartLoadExpectation: XCTestExpectation?
    var didFinishLoadExpectation: XCTestExpectation?
    var shouldStartLoadExpectation: XCTestExpectation?
    var didFailLoadExpectation: XCTestExpectation?
    
    func testDelegateDidStartLoad() {
        let vc = WebViewController()
        vc.delegate = self
        
        if let url = NSURL(string: "http://httpbin.org/") {
            didStartLoadExpectation = expectationWithDescription("did start load")
            
            vc.loadURL(url)
            
            waitForExpectationsWithTimeout(4.0, handler: nil)
        }
    }
    
    func testDelegateDidFinishLoad() {
        let vc = WebViewController()
        vc.delegate = self
        
        if let url = NSURL(string: "http://httpbin.org/") {
            didFinishLoadExpectation = expectationWithDescription("did finish load")
            
            vc.loadURL(url)
            waitForExpectationsWithTimeout(4.0, handler: nil)
        }
    }
    
    func testDelegateShouldStartLoad() {
        let vc = WebViewController()
        vc.delegate = self
        
        if let url = NSURL(string: "http://httpbin.org/") {
            shouldStartLoadExpectation = expectationWithDescription("should start load")
            
            vc.loadURL(url)
            waitForExpectationsWithTimeout(4.0, handler: nil)
        }<commit_msg>update unit test URLs to use HTTPS<commit_after>//
//  WebViewControllerDelegateTests.swift
//  ELHybridWeb
//
//  Created by <NAME> on 5/20/15.
//  Copyright (c) 2015 WalmartLabs. All rights reserved.
//

import UIKit
import XCTest
import ELHybridWeb
import ELJSBridge

class WebViewControllerDelegateTests: XCTestCase, WebViewControllerDelegate {
    
    var didStartLoadExpectation: XCTestExpectation?
    var didFinishLoadExpectation: XCTestExpectation?
    var shouldStartLoadExpectation: XCTestExpectation?
    var didFailLoadExpectation: XCTestExpectation?
    
    func testDelegateDidStartLoad() {
        let vc = WebViewController()
        vc.delegate = self
        
        if let url = NSURL(string: "https://httpbin.org/") {
            didStartLoadExpectation = expectationWithDescription("did start load")
            
            vc.loadURL(url)
            
            waitForExpectationsWithTimeout(4.0, handler: nil)
        }
    }
    
    func testDelegateDidFinishLoad() {
        let vc = WebViewController()
        vc.delegate = self
        
        if let url = NSURL(string: "https://httpbin.org/") {
            didFinishLoadExpectation = expectationWithDescription("did finish load")
            
            vc.loadURL(url)
            waitForExpectationsWithTimeout(4.0, handler: nil)
        }
    }
    
    func testDelegateShouldStartLoad() {
        let vc = WebViewController()
        vc.delegate = self
        
        if let url = NSURL(string: "https://httpbin.org/") {
            shouldStartLoadExpectation = expectationWithDescription("should start load")
            
            vc.loadURL(url)
            waitForExpectationsWithTimeout(4.0, handler: nil)
        }
{'fraction_non_alphanumeric': 0.08313817330210772, 'fraction_numerical': 0.008782201405152224, 'mean_word_length': 2.301449275362319, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7584960', 'n_tokens_mistral': 983, 'n_tokens_neox': 930, 'n_words': 204}