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

Side by Side Diff: chrome/browser/extensions/ad_view_browsertest.cc

Issue 12463015: Enable <adview> tag for packaged apps. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Merge fix. Created 7 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/extension_test_message_listener.h"
6 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
7 #include "chrome/common/chrome_switches.h"
8
9 class AdViewTest : public extensions::PlatformAppBrowserTest {
10 protected:
11 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
12 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line);
13 command_line->AppendSwitch(switches::kEnableAdview);
14 command_line->AppendSwitch(switches::kEnableAdviewSrcAttribute);
15 }
16 };
17
18 IN_PROC_BROWSER_TEST_F(AdViewTest, LoadEventIsCalled) {
19 ASSERT_TRUE(StartTestServer());
20
21 ExtensionTestMessageListener listener("guest-loaded", false);
22 LoadAndLaunchPlatformApp("ad_view/load_event");
23 ASSERT_TRUE(listener.WaitUntilSatisfied());
24 }
25
26 IN_PROC_BROWSER_TEST_F(AdViewTest, AdNetworkIsLoaded) {
27 ASSERT_TRUE(StartTestServer());
28
29 ExtensionTestMessageListener listener("ad-network-loaded", false);
30 LoadAndLaunchPlatformApp("ad_view/ad_network_loaded");
31 ASSERT_TRUE(listener.WaitUntilSatisfied());
32 }
33
34 // This test currently fails on trybots because it requires new binary file
35 // (image315.png). The test will be enabled once the binary files are committed.
36 IN_PROC_BROWSER_TEST_F(AdViewTest, DISABLED_DisplayFirstAd) {
37 ASSERT_TRUE(StartTestServer());
38
39 ExtensionTestMessageListener listener("ad-displayed", false);
40 LoadAndLaunchPlatformApp("ad_view/display_first_ad");
41 ASSERT_TRUE(listener.WaitUntilSatisfied());
42 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698