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

Side by Side Diff: ios/web/webui/crw_web_ui_page_builder_unittest.mm

Issue 1137143004: WebUI for WKWebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest issues Created 5 years, 7 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
« no previous file with comments | « ios/web/webui/crw_web_ui_page_builder.mm ('k') | ios/web/webui/resources/web_ui.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "ios/web/webui/crw_web_ui_page_builder.h" 5 #include "ios/web/webui/crw_web_ui_page_builder.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 23 matching lines...) Expand all
34 // URL for BuildPageWithWebUIJS. 34 // URL for BuildPageWithWebUIJS.
35 const char* kCoreJsPageUrl("http://corejs"); 35 const char* kCoreJsPageUrl("http://corejs");
36 36
37 // URL for JS resource. 37 // URL for JS resource.
38 const char* kJsResourceUrl("http://javascriptpage/resources/javascript.js"); 38 const char* kJsResourceUrl("http://javascriptpage/resources/javascript.js");
39 // URL for CSS resource. 39 // URL for CSS resource.
40 const char* kCssResourceUrl("http://csspage/resources/stylesheet.css"); 40 const char* kCssResourceUrl("http://csspage/resources/stylesheet.css");
41 // URL for CSS resource with import. 41 // URL for CSS resource with import.
42 const char* kCssImportResourceUrl("http://csspage/resources/import.css"); 42 const char* kCssImportResourceUrl("http://csspage/resources/import.css");
43 // Chrome URL for messaging JavaScript. 43 // Chrome URL for messaging JavaScript.
44 const char* kCoreJsResourceUrl("chrome://resources/js/ios/core.js"); 44 const char* kCoreJsResourceUrl("chrome://resources/js/ios/web_ui.js");
45 // String for relative resource URL. 45 // String for relative resource URL.
46 const char* kRelativeCssString("myresource.css"); 46 const char* kRelativeCssString("myresource.css");
47 47
48 // Template for JS tag with URL. 48 // Template for JS tag with URL.
49 NSString* const kJsTagTemplate = @"<script src=\"%@\"></script>"; 49 NSString* const kJsTagTemplate = @"<script src=\"%@\"></script>";
50 // Template for inlined JS tag. 50 // Template for inlined JS tag.
51 NSString* const kJsInlinedTemplate = @"<script>%@</script>"; 51 NSString* const kJsInlinedTemplate = @"<script>%@</script>";
52 // Template for CSS tag with URL. 52 // Template for CSS tag with URL.
53 NSString* const kCssTagTemplate = @"<link rel=\"stylesheet\" href=\"%@\">"; 53 NSString* const kCssTagTemplate = @"<link rel=\"stylesheet\" href=\"%@\">";
54 // Template for inlined CSS tag. 54 // Template for inlined CSS tag.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 TEST_F(CRWWebUIPageBuilderTest, BuildPageWithWebUIJS) { 267 TEST_F(CRWWebUIPageBuilderTest, BuildPageWithWebUIJS) {
268 NSString* core_js_html = 268 NSString* core_js_html =
269 PageForTagTemplateAndContent(kJsInlinedTemplate, kCoreJsContent); 269 PageForTagTemplateAndContent(kJsInlinedTemplate, kCoreJsContent);
270 [web_ui_page_builder_ buildWebUIPageForURL:GURL(kCoreJsPageUrl) 270 [web_ui_page_builder_ buildWebUIPageForURL:GURL(kCoreJsPageUrl)
271 completionHandler:^(NSString* result) { 271 completionHandler:^(NSString* result) {
272 EXPECT_NSEQ(core_js_html, result); 272 EXPECT_NSEQ(core_js_html, result);
273 }]; 273 }];
274 } 274 }
275 275
276 } // namespace web 276 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/webui/crw_web_ui_page_builder.mm ('k') | ios/web/webui/resources/web_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698