Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: ios/chrome/browser/find_in_page/js_findinpage_manager_unittest.mm

Issue 2711513002: [ios] Simplifies the Find In Page JS unittest. (Closed)
Patch Set: Rebased. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/find_in_page/js_findinpage_manager.h"
6
5 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
6 8
7 #import "base/test/ios/wait_util.h" 9 #import "base/test/ios/wait_util.h"
8 #import "ios/chrome/browser/find_in_page/js_findinpage_manager.h"
9 #import "ios/chrome/browser/web/chrome_web_test.h" 10 #import "ios/chrome/browser/web/chrome_web_test.h"
10 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h" 11 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
11 #import "ios/web/public/web_state/web_state.h" 12 #import "ios/web/public/web_state/web_state.h"
12 #import "testing/gtest_mac.h" 13 #import "testing/gtest_mac.h"
13 14
14 // Test fixture to test Find In Page JS. 15 // Test fixture to test Find In Page JS.
15 class JsFindinpageManagerTest : public ChromeWebTest { 16 class JsFindinpageManagerTest : public ChromeWebTest {
16 protected: 17 protected:
17 // Loads the given HTML and initializes the findInPage JS scripts. 18 // Loads the given HTML and initializes the findInPage JS scripts.
18 void LoadHtml(NSString* html) { 19 void LoadHtml(NSString* html) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 EXPECT_NSNE(@YES, result); 71 EXPECT_NSNE(@YES, result);
71 completion_handler_block_was_called = YES; 72 completion_handler_block_was_called = YES;
72 }]; 73 }];
73 }; 74 };
74 [manager_ findString:@"');token=true;('" 75 [manager_ findString:@"');token=true;('"
75 completionHandler:completion_handler_block]; 76 completionHandler:completion_handler_block];
76 base::test::ios::WaitUntilCondition(^bool() { 77 base::test::ios::WaitUntilCondition(^bool() {
77 return completion_handler_block_was_called; 78 return completion_handler_block_was_called;
78 }); 79 });
79 } 80 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/find_in_page/find_in_page_js_unittest.mm ('k') | ios/chrome/browser/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698