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

Side by Side Diff: chrome/browser/android/webapk/webapk_installer_unittest.cc

Issue 2226903002: Speculative fix for TestWebApkInstaller.Success on Lollipop Low-end Tester (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into test_timeout 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 | « no previous file | 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/webapk/webapk_installer.h" 5 #include "chrome/browser/android/webapk/webapk_installer.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 : url_request_context_getter_(new net::TestURLRequestContextGetter( 71 : url_request_context_getter_(new net::TestURLRequestContextGetter(
72 base::ThreadTaskRunnerHandle::Get())) {} 72 base::ThreadTaskRunnerHandle::Get())) {}
73 ~WebApkInstallerRunner() {} 73 ~WebApkInstallerRunner() {}
74 74
75 void Run() { 75 void Run() {
76 ShortcutInfo info(GURL::EmptyGURL()); 76 ShortcutInfo info(GURL::EmptyGURL());
77 77
78 // WebApkInstaller owns itself. 78 // WebApkInstaller owns itself.
79 WebApkInstaller* installer = new TestWebApkInstaller(info, SkBitmap()); 79 WebApkInstaller* installer = new TestWebApkInstaller(info, SkBitmap());
80 80
81 installer->SetTimeoutMs(20); 81 installer->SetTimeoutMs(100);
82 installer->InstallAsyncWithURLRequestContextGetter( 82 installer->InstallAsyncWithURLRequestContextGetter(
83 url_request_context_getter_.get(), 83 url_request_context_getter_.get(),
84 base::Bind(&WebApkInstallerRunner::OnCompleted, 84 base::Bind(&WebApkInstallerRunner::OnCompleted,
85 base::Unretained(this))); 85 base::Unretained(this)));
86 86
87 base::RunLoop run_loop; 87 base::RunLoop run_loop;
88 on_completed_callback_ = run_loop.QuitClosure(); 88 on_completed_callback_ = run_loop.QuitClosure();
89 run_loop.Run(); 89 run_loop.Run();
90 } 90 }
91 91
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // Test that an HTTP response which cannot be parsed as a webapk::WebApkResponse 243 // Test that an HTTP response which cannot be parsed as a webapk::WebApkResponse
244 // is handled properly. 244 // is handled properly.
245 TEST_F(WebApkInstallerTest, UnparsableCreateWebApkResponse) { 245 TEST_F(WebApkInstallerTest, UnparsableCreateWebApkResponse) {
246 SetWebApkResponseBuilder(base::Bind(&BuildUnparsableWebApkResponse)); 246 SetWebApkResponseBuilder(base::Bind(&BuildUnparsableWebApkResponse));
247 247
248 WebApkInstallerRunner runner; 248 WebApkInstallerRunner runner;
249 runner.Run(); 249 runner.Run();
250 EXPECT_FALSE(runner.success()); 250 EXPECT_FALSE(runner.success());
251 } 251 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698