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

Side by Side Diff: chrome/browser/banners/app_banner_data_fetcher_browsertest.cc

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 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 "chrome/browser/banners/app_banner_data_fetcher.h" 5 #include "chrome/browser/banners/app_banner_data_fetcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 class AppBannerDataFetcherBrowserTest : public InProcessBrowserTest, 59 class AppBannerDataFetcherBrowserTest : public InProcessBrowserTest,
60 public AppBannerDataFetcher::Delegate { 60 public AppBannerDataFetcher::Delegate {
61 public: 61 public:
62 AppBannerDataFetcherBrowserTest() : weak_factory_(this) { 62 AppBannerDataFetcherBrowserTest() : weak_factory_(this) {
63 } 63 }
64 64
65 void SetUpOnMainThread() override { 65 void SetUpOnMainThread() override {
66 AppBannerSettingsHelper::SetEngagementWeights(1, 1); 66 AppBannerSettingsHelper::SetEngagementWeights(1, 1);
67 AppBannerSettingsHelper::SetTotalEngagementToTrigger(2); 67 AppBannerSettingsHelper::SetTotalEngagementToTrigger(2);
68 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 68 ASSERT_TRUE(embedded_test_server()->Start());
69 InProcessBrowserTest::SetUpOnMainThread(); 69 InProcessBrowserTest::SetUpOnMainThread();
70 } 70 }
71 71
72 bool HandleNonWebApp(const std::string& platform, 72 bool HandleNonWebApp(const std::string& platform,
73 const GURL& url, 73 const GURL& url,
74 const std::string& id) override { 74 const std::string& id) override {
75 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_); 75 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_);
76 non_web_platform_ = platform; 76 non_web_platform_ = platform;
77 return false; 77 return false;
78 } 78 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 RunBannerTest("/banners/prompt_in_handler_test_page.html", 333 RunBannerTest("/banners/prompt_in_handler_test_page.html",
334 ui::PAGE_TRANSITION_TYPED, 1, true); 334 ui::PAGE_TRANSITION_TYPED, 1, true);
335 } 335 }
336 336
337 IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, WebAppBannerInIFrame) { 337 IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, WebAppBannerInIFrame) {
338 RunBannerTest("/banners/iframe_test_page.html", ui::PAGE_TRANSITION_TYPED, 1, 338 RunBannerTest("/banners/iframe_test_page.html", ui::PAGE_TRANSITION_TYPED, 1,
339 false); 339 false);
340 } 340 }
341 341
342 } // namespace banners 342 } // namespace banners
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_interactive_uitest.cc ('k') | chrome/browser/browser_keyevents_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698