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

Side by Side Diff: ios/web/shell/test/plugin_placeholder_egtest.mm

Issue 2195773002: Rename EarlGrey test classes with TestCase suffix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: after successful sync Created 4 years, 4 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/shell/test/pdf_egtest.mm ('k') | ios/web/shell/test/redirect_egtest.mm » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #import <EarlGrey/EarlGrey.h> 8 #import <EarlGrey/EarlGrey.h>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 19 matching lines...) Expand all
30 const GURL url = web::test::HttpServer::MakeUrl("http://plugin"); 30 const GURL url = web::test::HttpServer::MakeUrl("http://plugin");
31 std::map<GURL, std::string> responses{{url, page_content}}; 31 std::map<GURL, std::string> responses{{url, page_content}};
32 web::test::SetUpSimpleHttpServer(responses); 32 web::test::SetUpSimpleHttpServer(responses);
33 web::shell_test_util::LoadUrl(url); 33 web::shell_test_util::LoadUrl(url);
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 // Plugin placeholder test cases for the web shell. These tests verify that web 38 // Plugin placeholder test cases for the web shell. These tests verify that web
39 // page shows a placeholder for unsupported plugins. 39 // page shows a placeholder for unsupported plugins.
40 @interface PluginPlaceholderTest : ShellBaseTestCase 40 @interface PluginPlaceholderTestCase : ShellBaseTestCase
41 @end 41 @end
42 42
43 @implementation PluginPlaceholderTest 43 @implementation PluginPlaceholderTestCase
44 44
45 // Tests that a large <applet> with text fallback is untouched. 45 // Tests that a large <applet> with text fallback is untouched.
46 - (void)testPluginPlaceholderAppletFallback { 46 - (void)testPluginPlaceholderAppletFallback {
47 const char kPageDescription[] = "Applet, text fallback"; 47 const char kPageDescription[] = "Applet, text fallback";
48 const char kFallbackText[] = "Java? On iOS? C'mon."; 48 const char kFallbackText[] = "Java? On iOS? C'mon.";
49 const std::string page = base::StringPrintf( 49 const std::string page = base::StringPrintf(
50 "<html><body width='800' height='600'>" 50 "<html><body width='800' height='600'>"
51 "<p>%s</p>" 51 "<p>%s</p>"
52 "<applet code='Some.class' width='550' height='550'>" 52 "<applet code='Some.class' width='550' height='550'>"
53 " <p>%s</p>" 53 " <p>%s</p>"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 LoadPage(page); 203 LoadPage(page);
204 204
205 // Verify that placeholder image is not displayed. 205 // Verify that placeholder image is not displayed.
206 [[EarlGrey selectElementWithMatcher:webViewContainingText(kPageDescription)] 206 [[EarlGrey selectElementWithMatcher:webViewContainingText(kPageDescription)]
207 assertWithMatcher:grey_notNil()]; 207 assertWithMatcher:grey_notNil()];
208 [[EarlGrey selectElementWithMatcher:webViewCssSelector("img")] 208 [[EarlGrey selectElementWithMatcher:webViewCssSelector("img")]
209 assertWithMatcher:grey_nil()]; 209 assertWithMatcher:grey_nil()];
210 } 210 }
211 211
212 @end 212 @end
OLDNEW
« no previous file with comments | « ios/web/shell/test/pdf_egtest.mm ('k') | ios/web/shell/test/redirect_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698