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

Side by Side Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc

Issue 2720083002: Make OnDataTimedout and OnDidPerformInstallableCheck mutually exclusive. (Closed)
Patch Set: Correcting mistakes 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
« no previous file with comments | « chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc ('k') | no next file » | 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 "chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h" 5 #include "chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 15 matching lines...) Expand all
26 #include "content/public/browser/browser_thread.h" 26 #include "content/public/browser/browser_thread.h"
27 #include "content/public/browser/site_instance.h" 27 #include "content/public/browser/site_instance.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "content/public/common/manifest.h" 29 #include "content/public/common/manifest.h"
30 #include "content/test/test_web_contents.h" 30 #include "content/test/test_web_contents.h"
31 #include "net/http/http_status_code.h" 31 #include "net/http/http_status_code.h"
32 #include "third_party/WebKit/public/platform/WebDisplayMode.h" 32 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
33 #include "ui/gfx/image/image_unittest_util.h" 33 #include "ui/gfx/image/image_unittest_util.h"
34 #include "url/gurl.h" 34 #include "url/gurl.h"
35 35
36 // TODO(zpeng): Effectively test scenarios where both timeout callback and
37 // success callback are invoked. See crbug.com/697228.
38
36 namespace { 39 namespace {
37 40
38 const char* kDefaultManifestUrl = "https://www.example.com/manifest.json"; 41 const char* kDefaultManifestUrl = "https://www.example.com/manifest.json";
39 const char* kDefaultManifestName = "Default Name"; 42 const char* kDefaultManifestName = "Default Name";
40 const char* kDefaultManifestShortName = "Default Short Name"; 43 const char* kDefaultManifestShortName = "Default Short Name";
41 const char* kDefaultStartUrl = "https://www.example.com/index.html"; 44 const char* kDefaultStartUrl = "https://www.example.com/index.html";
42 const blink::WebDisplayMode kDefaultManifestDisplayMode = 45 const blink::WebDisplayMode kDefaultManifestDisplayMode =
43 blink::WebDisplayModeStandalone; 46 blink::WebDisplayModeStandalone;
44 47
45 // WebContents subclass which mocks out image and manifest fetching. 48 // WebContents subclass which mocks out image and manifest fetching.
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 362 }
360 // This callback enables the text field in the add-to-homescreen dialog. 363 // This callback enables the text field in the add-to-homescreen dialog.
361 EXPECT_TRUE(waiter.title_available()); 364 EXPECT_TRUE(waiter.title_available());
362 365
363 fetcher->set_weak_observer(nullptr); 366 fetcher->set_weak_observer(nullptr);
364 } 367 }
365 368
366 INSTANTIATE_TEST_CASE_P(CheckWebApkCompatibility, 369 INSTANTIATE_TEST_CASE_P(CheckWebApkCompatibility,
367 AddToHomescreenDataFetcherTestCommon, 370 AddToHomescreenDataFetcherTestCommon,
368 ::testing::Values(false, true)); 371 ::testing::Values(false, true));
OLDNEW
« no previous file with comments | « chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698