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

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: Remove redundant else and add TODO for tests 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
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(697228): Fix slow & incomplete tests.
dominickn 2017/02/28 23:17:12 TODO(zpeng): Add tests for <things to add tests fo
F 2017/02/28 23:22:06 Done. Thanks!
37
36 namespace { 38 namespace {
37 39
38 const char* kDefaultManifestUrl = "https://www.example.com/manifest.json"; 40 const char* kDefaultManifestUrl = "https://www.example.com/manifest.json";
39 const char* kDefaultManifestName = "Default Name"; 41 const char* kDefaultManifestName = "Default Name";
40 const char* kDefaultManifestShortName = "Default Short Name"; 42 const char* kDefaultManifestShortName = "Default Short Name";
41 const char* kDefaultStartUrl = "https://www.example.com/index.html"; 43 const char* kDefaultStartUrl = "https://www.example.com/index.html";
42 const blink::WebDisplayMode kDefaultManifestDisplayMode = 44 const blink::WebDisplayMode kDefaultManifestDisplayMode =
43 blink::WebDisplayModeStandalone; 45 blink::WebDisplayModeStandalone;
44 46
45 // WebContents subclass which mocks out image and manifest fetching. 47 // WebContents subclass which mocks out image and manifest fetching.
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 361 }
360 // This callback enables the text field in the add-to-homescreen dialog. 362 // This callback enables the text field in the add-to-homescreen dialog.
361 EXPECT_TRUE(waiter.title_available()); 363 EXPECT_TRUE(waiter.title_available());
362 364
363 fetcher->set_weak_observer(nullptr); 365 fetcher->set_weak_observer(nullptr);
364 } 366 }
365 367
366 INSTANTIATE_TEST_CASE_P(CheckWebApkCompatibility, 368 INSTANTIATE_TEST_CASE_P(CheckWebApkCompatibility,
367 AddToHomescreenDataFetcherTestCommon, 369 AddToHomescreenDataFetcherTestCommon,
368 ::testing::Values(false, true)); 370 ::testing::Values(false, true));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698