summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorBartosz Fabianowski <bartfab@chromium.org>2015-04-16 12:10:58 +0200
committerBartosz Fabianowski <bartfab@chromium.org>2015-04-16 10:12:18 +0000
commit919dce4400651813d5ff6e8a85b944a5987adcb7 (patch)
tree0fa9f186e1cb84404489c0a626bbd641c2db2ad1 /chrome
parent57d761013f14bc09f47d45d6ef36114a97401b3b (diff)
downloadchromium_src-919dce4400651813d5ff6e8a85b944a5987adcb7.zip
chromium_src-919dce4400651813d5ff6e8a85b944a5987adcb7.tar.gz
chromium_src-919dce4400651813d5ff6e8a85b944a5987adcb7.tar.bz2
Speculative revert by sheriff
I am reverting all CLs that could have caused this failure: http://build.chromium.org/p/chromium.linux/builders/ Android%20Tests%20%28dbg%29/builds/27276 I will start re-landing vindicated CLs shortly. Revert "Convert a11y_page.css to a11y_page_style.html. See http://goo.gl/vIGSCO for more information." This reverts commit eb48d65705e44b80d1d7a3b4f21c567802c102bb. Revert "Supply build properties to run-bisect-perf regression for android bisects." This reverts commit 9d70bb94984b02c17678ccf482d1a7b7c760a43f. Revert "[cros New-GAIA] Webview login and new GAIA endpoint enabled by default" This reverts commit 29061783f8b59f1e78286a87a3bb7d18129f639a. Revert "Prime the landing pad for the new video rendering pipeline." This reverts commit 45a3c93f745eabf6c1b1cbdac87ed4350a919e76. Revert "Implement separate error dialog for cws widget container" This reverts commit 7ed1f876f6f4d79ac074b25f2066d514603aa18d. Revert "Create device_bluetooth watchlist; add scheib." This reverts commit 40514c99cd45d1c8e9caef3245d42533d9810179. Revert "Convert checkbox.css to checkbox_style.html. See http://goo.gl/vIGSCO for more information." This reverts commit a687f31a786645508622482e9033f497364a43cd. Revert "Created new URLRequestContext for secure proxy check." This reverts commit 652eabf1141c00594aa6e9ed81beb980aec89198. Revert "Revert of Fix scroll regression when specifying an extension id. (patchset #4 id:60001 of https://codereview.chromium.org/1064573003/)" This reverts commit 488846cd562f444831982d82ef0bc9ca0dd79028. Revert "Sync: Add Android test for downloading a bookmark" This reverts commit 9c052713563111ac3d6cc64d4b5cfdfa27c202f4. Revert "ScreenOrientationController to start observing even without an internal display." This reverts commit 31fed68a524d49f99cebf02dca6ad49019e9900c. Revert "Fix MB configurations for Mac and Win GN bots." This reverts commit 31a66f3e705d20a39033a7b7d7f09a60517e6b9d. Revert "Add tool/perf/measurements path to check for CQ jobs." This reverts commit 99e1ac1d217174dad7a862f6a0fc44950d503737. Revert "Implement Notification.data for persistent notifications." This reverts commit 539f51d6af62097059c34b1c19dfbc4352413ad7. Revert "Fix playback rate calculations for WallClockTimeSource." This reverts commit 3ec02d642465872d9ab7d7db600d0480a57b3cab. Revert "Roll src/third_party/pdfium eddab44:b330016" This reverts commit 81d51e253cfacd5648cca9f12b605e63971a9ab1. Revert "cc: Make DisplayItemList::Append replay into an SkPicture" This reverts commit ec7c07e57bc5f91e3ba0bdeba8b6f534978615b0. Revert "Clean up URLFetcher unit tests, part 5." This reverts commit 8eeb3bf4a02be612cacb3cdbb5c223d909939527. BUG=None TBR=akuegel Review URL: https://codereview.chromium.org/1083683003 Cr-Commit-Position: refs/heads/master@{#325411}
Diffstat (limited to 'chrome')
-rw-r--r--chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java52
-rw-r--r--chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java17
-rw-r--r--chrome/browser/chromeos/login/helper.cc16
-rw-r--r--chrome/browser/chromeos/login/hid_detection_browsertest.cc16
-rw-r--r--chrome/browser/chromeos/login/login_browsertest.cc35
-rw-r--r--chrome/browser/chromeos/login/login_manager_test.cc32
-rw-r--r--chrome/browser/chromeos/login/login_manager_test.h7
-rw-r--r--chrome/browser/chromeos/login/oobe_browsertest.cc66
-rw-r--r--chrome/browser/chromeos/login/proxy_auth_dialog_browsertest.cc20
-rw-r--r--chrome/browser/chromeos/login/saml/saml_browsertest.cc15
-rw-r--r--chrome/browser/chromeos/login/session/user_session_manager.cc52
-rw-r--r--chrome/browser/chromeos/login/signin/oauth2_browsertest.cc44
-rw-r--r--chrome/browser/chromeos/login/startup_utils.cc37
-rw-r--r--chrome/browser/chromeos/login/test/oobe_base_test.cc74
-rw-r--r--chrome/browser/chromeos/login/test/oobe_base_test.h25
-rw-r--r--chrome/browser/chromeos/login/webview_login_browsertest.cc44
-rw-r--r--chrome/browser/chromeos/login/wizard_controller_browsertest.cc41
-rw-r--r--chrome/browser/chromeos/policy/blocking_login_browsertest.cc37
-rw-r--r--chrome/browser/resources/extensions/extension_list.js29
-rw-r--r--chrome/browser/resources/extensions/extensions.js1
-rw-r--r--chrome/browser/resources/settings/a11y_page/a11y_page.css (renamed from chrome/browser/resources/settings/a11y_page/a11y_page_style.html)7
-rw-r--r--chrome/browser/resources/settings/a11y_page/a11y_page.html3
-rw-r--r--chrome/browser/resources/settings/checkbox/checkbox.css (renamed from chrome/browser/resources/settings/checkbox/checkbox_style.html)7
-rw-r--r--chrome/browser/resources/settings/checkbox/checkbox.html3
-rw-r--r--chrome/browser/resources/settings/settings_resources.grd8
-rw-r--r--chrome/chrome_tests.gypi4
-rw-r--r--chrome/common/pref_names.cc5
-rw-r--r--chrome/common/pref_names.h2
-rw-r--r--chrome/interactive_ui_tests.isolate1
-rw-r--r--chrome/test/data/notifications/platform_notification_service.html5
30 files changed, 242 insertions, 463 deletions
diff --git a/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java b/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java
index b25eca1..d2a6d15 100644
--- a/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java
+++ b/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java
@@ -71,8 +71,11 @@ public class FakeServerHelper {
* Deletes the existing FakeServer.
*/
public static void deleteFakeServer() {
- checkFakeServerInitialized(
- "useFakeServer must be called before calling deleteFakeServer.");
+ if (sNativeFakeServer == 0L) {
+ throw new IllegalStateException(
+ "useFakeServer must be called before calling deleteFakeServer.");
+ }
+
ThreadUtils.runOnUiThreadBlockingNoException(new Callable<Void>() {
@Override
public Void call() {
@@ -124,8 +127,10 @@ public class FakeServerHelper {
* @return whether the number of specified entities exist
*/
public boolean verifyEntityCountByTypeAndName(int count, ModelType modelType, String name) {
- checkFakeServerInitialized(
+ if (sNativeFakeServer == 0L) {
+ throw new IllegalStateException(
"useFakeServer must be called before data verification.");
+ }
return nativeVerifyEntityCountByTypeAndName(mNativeFakeServerHelperAndroid,
sNativeFakeServer, count, modelType.toString(), name);
}
@@ -139,44 +144,16 @@ public class FakeServerHelper {
* @param entitySpecifics the EntitySpecifics proto that represents the entity to inject
*/
public void injectUniqueClientEntity(String name, EntitySpecifics entitySpecifics) {
- checkFakeServerInitialized("useFakeServer must be called before data injection.");
+ if (sNativeFakeServer == 0L) {
+ throw new IllegalStateException(
+ "useFakeServer must be called before data injection.");
+ }
// The protocol buffer is serialized as a byte array because it can be easily deserialized
// from this format in native code.
nativeInjectUniqueClientEntity(mNativeFakeServerHelperAndroid, sNativeFakeServer, name,
MessageNano.toByteArray(entitySpecifics));
}
- /**
- * Injects a bookmark into the fake Sync server.
- *
- * @param title the title of the bookmark to inject
- * @param url the URL of the bookmark to inject. This String will be passed to the native GURL
- * class, so it must be a valid URL under its definition.
- * @param parentId the ID of the desired parent bookmark folder
- */
- public void injectBookmarkEntity(String title, String url, String parentId) {
- checkFakeServerInitialized("useFakeServer must be called before data injection.");
- nativeInjectBookmarkEntity(mNativeFakeServerHelperAndroid, sNativeFakeServer, title, url,
- parentId);
- }
-
- /**
- * Returns the ID of the Bookmark Bar. This value is to be used in conjunction with
- * injectBookmarkEntity.
- *
- * @return the opaque ID of the bookmark bar entity stored in the server
- */
- public String getBookmarkBarFolderId() {
- checkFakeServerInitialized("useFakeServer must be called before access");
- return nativeGetBookmarkBarFolderId(mNativeFakeServerHelperAndroid, sNativeFakeServer);
- }
-
- private static void checkFakeServerInitialized(String failureMessage) {
- if (sNativeFakeServer == 0L) {
- throw new IllegalStateException(failureMessage);
- }
- }
-
// Native methods.
private native long nativeInit();
private native long nativeCreateFakeServer(long nativeFakeServerHelperAndroid);
@@ -190,9 +167,4 @@ public class FakeServerHelper {
private native void nativeInjectUniqueClientEntity(
long nativeFakeServerHelperAndroid, long nativeFakeServer, String name,
byte[] serializedEntitySpecifics);
- private native void nativeInjectBookmarkEntity(
- long nativeFakeServerHelperAndroid, long nativeFakeServer, String title, String url,
- String parentId);
- private native String nativeGetBookmarkBarFolderId(
- long nativeFakeServerHelperAndroid, long nativeFakeServer);
}
diff --git a/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java b/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java
index 27226bd..730500c 100644
--- a/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java
+++ b/chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java
@@ -291,23 +291,6 @@ public class SyncTest extends ChromeShellTestBase {
// injected. This data should be retrieved from the Sync node browser data.
}
- @LargeTest
- @Feature({"Sync"})
- public void testDownloadBookmark() throws InterruptedException {
- setupTestAccountAndSignInToSync(FOREIGN_SESSION_TEST_MACHINE_ID);
- // 3 bookmark folders exist by default: Bookmarks Bar, Other Bookmarks, Mobile Bookmarks.
- assertLocalEntityCount("Bookmarks", 3);
-
- mFakeServerHelper.injectBookmarkEntity(
- "Title", "http://chromium.org", mFakeServerHelper.getBookmarkBarFolderId());
-
- SyncTestUtil.triggerSyncAndWaitForCompletion(mContext);
- assertLocalEntityCount("Bookmarks", 4);
-
- // TODO(pvalenzuela): Also verify that the downloaded bookmark matches the one that was
- // injected. This data should be retrieved from the Sync node browser data.
- }
-
private void setupTestAccountAndSignInToSync(
final String syncClientIdentifier)
throws InterruptedException {
diff --git a/chrome/browser/chromeos/login/helper.cc b/chrome/browser/chromeos/login/helper.cc
index f949875..afe1bf4 100644
--- a/chrome/browser/chromeos/login/helper.cc
+++ b/chrome/browser/chromeos/login/helper.cc
@@ -153,20 +153,8 @@ content::StoragePartition* GetSigninPartition() {
}
net::URLRequestContextGetter* GetSigninContext() {
- if (StartupUtils::IsWebviewSigninEnabled()) {
- content::StoragePartition* signin_partition = GetSigninPartition();
-
- // Special case for unit tests. There's no LoginDisplayHost thus no
- // webview instance. TODO(nkostylev): Investigate if there's a better
- // place to address this like dependency injection. http://crbug.com/477402
- if (!signin_partition && !LoginDisplayHostImpl::default_host())
- return ProfileHelper::GetSigninProfile()->GetRequestContext();
-
- if (!signin_partition)
- return nullptr;
-
- return signin_partition->GetURLRequestContext();
- }
+ if (StartupUtils::IsWebviewSigninEnabled())
+ return GetSigninPartition()->GetURLRequestContext();
return ProfileHelper::GetSigninProfile()->GetRequestContext();
}
diff --git a/chrome/browser/chromeos/login/hid_detection_browsertest.cc b/chrome/browser/chromeos/login/hid_detection_browsertest.cc
index d4e31b2..ebb23d2 100644
--- a/chrome/browser/chromeos/login/hid_detection_browsertest.cc
+++ b/chrome/browser/chromeos/login/hid_detection_browsertest.cc
@@ -43,15 +43,11 @@ void SetUpBluetoothMock(
namespace chromeos {
-// Boolean parameter is used to run this test for webview (true) and for
-// iframe (false) GAIA sign in.
-class HidDetectionTest : public OobeBaseTest,
- public testing::WithParamInterface<bool> {
+class HidDetectionTest : public OobeBaseTest {
public:
typedef device::InputServiceLinux::InputDeviceInfo InputDeviceInfo;
HidDetectionTest() : weak_ptr_factory_(this) {
- set_use_webview(GetParam());
InputServiceProxy::SetThreadIdForTesting(content::BrowserThread::UI);
HidDetectionTest::InitInputService();
}
@@ -116,17 +112,13 @@ class HidDetectionSkipTest : public HidDetectionTest {
}
};
-IN_PROC_BROWSER_TEST_P(HidDetectionTest, NoDevicesConnected) {
+IN_PROC_BROWSER_TEST_F(HidDetectionTest, NoDevicesConnected) {
OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_HID_DETECTION).Wait();
}
-IN_PROC_BROWSER_TEST_P(HidDetectionSkipTest, BothDevicesPreConnected) {
+IN_PROC_BROWSER_TEST_F(HidDetectionSkipTest, BothDevicesPreConnected) {
OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_NETWORK).Wait();
-}
-INSTANTIATE_TEST_CASE_P(HidDetectionSuite, HidDetectionTest, testing::Bool());
-INSTANTIATE_TEST_CASE_P(HidDetectionSkipSuite,
- HidDetectionSkipTest,
- testing::Bool());
+}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index 5d1cffa..85880b1 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -5,8 +5,6 @@
#include "ash/shell.h"
#include "ash/system/tray/system_tray.h"
#include "base/command_line.h"
-#include "base/json/json_file_value_serializer.h"
-#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
@@ -19,9 +17,7 @@
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_constants.h"
-#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/tracing.h"
@@ -147,33 +143,6 @@ class LoginTest : public chromeos::LoginManagerTest {
}
};
-class LoginOfflineTest : public LoginTest {
- public:
- LoginOfflineTest() {}
- ~LoginOfflineTest() override {}
-
- bool SetUpUserDataDirectory() override {
- base::FilePath user_data_dir;
- CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
- base::FilePath local_state_path =
- user_data_dir.Append(chrome::kLocalStateFilename);
- base::DictionaryValue local_state_dict;
-
- // Set webview disabled flag only when local state file does not exist.
- // Otherwise, we break PRE tests that leave state in it.
- if (!base::PathExists(local_state_path)) {
- // TODO(rsorokin): Fix offline test for webview signin.
- // http://crbug.com/475569
- local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true);
-
- CHECK(JSONFileValueSerializer(local_state_path)
- .Serialize(local_state_dict));
- }
-
- return LoginTest::SetUpUserDataDirectory();
- }
-};
-
// Used to make sure that the system tray is visible and within the screen
// bounds after login.
void TestSystemTrayIsVisible() {
@@ -246,14 +215,14 @@ IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) {
ASSERT_TRUE(tracing::EndTracing(&json_events));
}
-IN_PROC_BROWSER_TEST_F(LoginOfflineTest, PRE_GaiaAuthOffline) {
+IN_PROC_BROWSER_TEST_F(LoginTest, PRE_GaiaAuthOffline) {
RegisterUser(kTestUser);
chromeos::StartupUtils::MarkOobeCompleted();
chromeos::CrosSettings::Get()->SetBoolean(
chromeos::kAccountsPrefShowUserNamesOnSignIn, false);
}
-IN_PROC_BROWSER_TEST_F(LoginOfflineTest, GaiaAuthOffline) {
+IN_PROC_BROWSER_TEST_F(LoginTest, GaiaAuthOffline) {
bool show_user;
ASSERT_TRUE(chromeos::CrosSettings::Get()->GetBoolean(
chromeos::kAccountsPrefShowUserNamesOnSignIn, &show_user));
diff --git a/chrome/browser/chromeos/login/login_manager_test.cc b/chrome/browser/chromeos/login/login_manager_test.cc
index bd44832..45a6101 100644
--- a/chrome/browser/chromeos/login/login_manager_test.cc
+++ b/chrome/browser/chromeos/login/login_manager_test.cc
@@ -5,20 +5,14 @@
#include "chrome/browser/chromeos/login/login_manager_test.h"
#include "base/command_line.h"
-#include "base/json/json_file_value_serializer.h"
-#include "base/path_service.h"
#include "base/prefs/scoped_user_pref_update.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
#include "chrome/browser/chromeos/login/session/user_session_manager.h"
#include "chrome/browser/chromeos/login/session/user_session_manager_test_api.h"
-#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/ui/webui_login_view.h"
-#include "chrome/common/chrome_constants.h"
-#include "chrome/common/chrome_paths.h"
-#include "chrome/common/pref_names.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/login/auth/key.h"
#include "chromeos/login/auth/user_context.h"
@@ -33,8 +27,7 @@
namespace chromeos {
LoginManagerTest::LoginManagerTest(bool should_launch_browser)
- : use_webview_(false),
- should_launch_browser_(should_launch_browser),
+ : should_launch_browser_(should_launch_browser),
web_contents_(NULL) {
set_exit_when_last_browser_closes(false);
}
@@ -68,29 +61,6 @@ void LoginManagerTest::SetUpOnMainThread() {
should_launch_browser_);
}
-bool LoginManagerTest::SetUpUserDataDirectory() {
- base::FilePath user_data_dir;
- CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
- base::FilePath local_state_path =
- user_data_dir.Append(chrome::kLocalStateFilename);
-
- if (!use_webview()) {
- // Set webview disabled flag only when local state file does not exist.
- // Otherwise, we break PRE tests that leave state in it.
- if (!base::PathExists(local_state_path)) {
- base::DictionaryValue local_state_dict;
-
- // TODO(nkostylev): Fix tests that fail with webview signin.
- local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true);
-
- CHECK(JSONFileValueSerializer(local_state_path)
- .Serialize(local_state_dict));
- }
- }
-
- return MixinBasedBrowserTest::SetUpUserDataDirectory();
-}
-
void LoginManagerTest::RegisterUser(const std::string& user_id) {
ListPrefUpdate users_pref(g_browser_process->local_state(), "LoggedInUsers");
users_pref->AppendIfNotPresent(new base::StringValue(user_id));
diff --git a/chrome/browser/chromeos/login/login_manager_test.h b/chrome/browser/chromeos/login/login_manager_test.h
index ff4a6dd..e2b6921 100644
--- a/chrome/browser/chromeos/login/login_manager_test.h
+++ b/chrome/browser/chromeos/login/login_manager_test.h
@@ -33,7 +33,6 @@ class LoginManagerTest : public MixinBasedBrowserTest {
void SetUpCommandLine(base::CommandLine* command_line) override;
void SetUpInProcessBrowserTestFixture() override;
void SetUpOnMainThread() override;
- bool SetUpUserDataDirectory() override;
// Registers the user with the given |user_id| on the device.
// This method should be called in PRE_* test.
@@ -67,12 +66,6 @@ class LoginManagerTest : public MixinBasedBrowserTest {
test::JSChecker& js_checker() { return js_checker_; }
- protected:
- bool use_webview() { return use_webview_; }
- void set_use_webview(bool use_webview) { use_webview_ = use_webview; }
-
- bool use_webview_;
-
private:
void InitializeWebContents();
diff --git a/chrome/browser/chromeos/login/oobe_browsertest.cc b/chrome/browser/chromeos/login/oobe_browsertest.cc
index 2f13bd1..da7e596 100644
--- a/chrome/browser/chromeos/login/oobe_browsertest.cc
+++ b/chrome/browser/chromeos/login/oobe_browsertest.cc
@@ -5,7 +5,6 @@
#include "base/command_line.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
-#include "chrome/browser/chromeos/login/test/oobe_base_test.h"
#include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/ui/webui_login_display.h"
@@ -15,8 +14,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chromeos/chromeos_switches.h"
-#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
+#include "google_apis/gaia/fake_gaia.h"
#include "google_apis/gaia/gaia_switches.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_response.h"
@@ -28,17 +27,28 @@ using namespace net::test_server;
namespace chromeos {
-// Boolean parameter is used to run this test for webview (true) and for
-// iframe (false) GAIA sign in.
-class OobeTest : public OobeBaseTest, public testing::WithParamInterface<bool> {
+class OobeTest : public InProcessBrowserTest {
public:
- OobeTest() { set_use_webview(GetParam()); }
+ OobeTest() {}
~OobeTest() override {}
void SetUpCommandLine(base::CommandLine* command_line) override {
- command_line->AppendSwitch(switches::kOobeSkipPostLogin);
+ command_line->AppendSwitch(chromeos::switches::kLoginManager);
+ command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
+ command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
+ command_line->AppendSwitchASCII(
+ ::switches::kAuthExtensionPath, "gaia_auth");
+ fake_gaia_.Initialize();
+ }
+
+ void SetUpOnMainThread() override {
+ CHECK(embedded_test_server()->InitializeAndWaitUntilReady());
+ embedded_test_server()->RegisterRequestHandler(
+ base::Bind(&FakeGaia::HandleRequest, base::Unretained(&fake_gaia_)));
+ LOG(INFO) << "Set up http server at " << embedded_test_server()->base_url();
- OobeBaseTest::SetUpCommandLine(command_line);
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ ::switches::kGaiaUrl, embedded_test_server()->base_url().spec());
}
void TearDownOnMainThread() override {
@@ -48,8 +58,6 @@ class OobeTest : public OobeBaseTest, public testing::WithParamInterface<bool> {
base::Bind(&chrome::AttemptExit));
content::RunMessageLoop();
}
-
- OobeBaseTest::TearDownOnMainThread();
}
chromeos::WebUILoginDisplay* GetLoginDisplay() {
@@ -67,24 +75,40 @@ class OobeTest : public OobeBaseTest, public testing::WithParamInterface<bool> {
}
private:
+ FakeGaia fake_gaia_;
DISALLOW_COPY_AND_ASSIGN(OobeTest);
};
-IN_PROC_BROWSER_TEST_P(OobeTest, NewUser) {
- WaitForGaiaPageLoad();
+IN_PROC_BROWSER_TEST_F(OobeTest, NewUser) {
+ chromeos::WizardController::SkipPostLoginScreensForTesting();
+ chromeos::WizardController* wizard_controller =
+ chromeos::WizardController::default_controller();
+ CHECK(wizard_controller);
+ wizard_controller->SkipToLoginForTesting(LoginScreenContext());
- content::WindowedNotificationObserver session_start_waiter(
- chrome::NOTIFICATION_SESSION_STARTED,
- content::NotificationService::AllSources());
+ content::WindowedNotificationObserver(
+ chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
+ content::NotificationService::AllSources()).Wait();
- GetLoginDisplay()->ShowSigninScreenForCreds(OobeBaseTest::kFakeUserEmail,
- OobeBaseTest::kFakeUserPassword);
+ // TODO(glotov): mock GAIA server (test_server()) should support
+ // username/password configuration.
+ GetLoginDisplay()->ShowSigninScreenForCreds("username", "password");
- session_start_waiter.Wait();
+ content::WindowedNotificationObserver(
+ chrome::NOTIFICATION_SESSION_STARTED,
+ content::NotificationService::AllSources()).Wait();
}
-IN_PROC_BROWSER_TEST_P(OobeTest, Accelerator) {
- WaitForGaiaPageLoad();
+IN_PROC_BROWSER_TEST_F(OobeTest, Accelerator) {
+ chromeos::WizardController::SkipPostLoginScreensForTesting();
+ chromeos::WizardController* wizard_controller =
+ chromeos::WizardController::default_controller();
+ CHECK(wizard_controller);
+ wizard_controller->SkipToLoginForTesting(LoginScreenContext());
+
+ content::WindowedNotificationObserver(
+ chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
+ content::NotificationService::AllSources()).Wait();
gfx::NativeWindow login_window = GetLoginWindowWidget()->GetNativeWindow();
@@ -97,6 +121,4 @@ IN_PROC_BROWSER_TEST_P(OobeTest, Accelerator) {
OobeScreenWaiter(OobeDisplay::SCREEN_OOBE_ENROLLMENT).Wait();
}
-INSTANTIATE_TEST_CASE_P(OobeSuite, OobeTest, testing::Bool());
-
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/proxy_auth_dialog_browsertest.cc b/chrome/browser/chromeos/login/proxy_auth_dialog_browsertest.cc
index 3eef72f..eca6b5c 100644
--- a/chrome/browser/chromeos/login/proxy_auth_dialog_browsertest.cc
+++ b/chrome/browser/chromeos/login/proxy_auth_dialog_browsertest.cc
@@ -57,21 +57,13 @@ class ProxyAuthDialogWaiter : public content::WindowedNotificationObserver {
} // namespace
-// Boolean parameter is used to run this test for webview (true) and for
-// iframe (false) GAIA sign in.
-class ProxyAuthOnUserBoardScreenTest
- : public LoginManagerTest,
- public testing::WithParamInterface<bool> {
+class ProxyAuthOnUserBoardScreenTest : public LoginManagerTest {
public:
ProxyAuthOnUserBoardScreenTest()
: LoginManagerTest(true /* should_launch_browser */),
proxy_server_(net::SpawnedTestServer::TYPE_BASIC_AUTH_PROXY,
net::SpawnedTestServer::kLocalhost,
- base::FilePath()) {
- // TODO(paulmeyer): Re-enable webview version of this test
- // (uncomment this line) once http://crbug.com/452452 is fixed.
- // set_use_webview(GetParam());
- }
+ base::FilePath()) {}
~ProxyAuthOnUserBoardScreenTest() override {}
@@ -92,13 +84,13 @@ class ProxyAuthOnUserBoardScreenTest
DISALLOW_COPY_AND_ASSIGN(ProxyAuthOnUserBoardScreenTest);
};
-IN_PROC_BROWSER_TEST_P(ProxyAuthOnUserBoardScreenTest,
+IN_PROC_BROWSER_TEST_F(ProxyAuthOnUserBoardScreenTest,
PRE_ProxyAuthDialogOnUserBoardScreen) {
RegisterUser("test-user@gmail.com");
StartupUtils::MarkOobeCompleted();
}
-IN_PROC_BROWSER_TEST_P(ProxyAuthOnUserBoardScreenTest,
+IN_PROC_BROWSER_TEST_F(ProxyAuthOnUserBoardScreenTest,
ProxyAuthDialogOnUserBoardScreen) {
LoginDisplayHost* login_display_host = LoginDisplayHostImpl::default_host();
WebUILoginView* web_ui_login_view = login_display_host->GetWebUILoginView();
@@ -128,8 +120,4 @@ IN_PROC_BROWSER_TEST_P(ProxyAuthOnUserBoardScreenTest,
}
}
-INSTANTIATE_TEST_CASE_P(ProxyAuthOnUserBoardScreenTestSuite,
- ProxyAuthOnUserBoardScreenTest,
- testing::Bool());
-
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/saml/saml_browsertest.cc b/chrome/browser/chromeos/login/saml/saml_browsertest.cc
index ce4d3c0..0a11e4c 100644
--- a/chrome/browser/chromeos/login/saml/saml_browsertest.cc
+++ b/chrome/browser/chromeos/login/saml/saml_browsertest.cc
@@ -170,7 +170,7 @@ void FakeSamlIdp::SetUp(const std::string& base_path, const GURL& gaia_url) {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir));
html_template_dir_ = test_data_dir.Append("login");
- login_path_ = base_path;
+ login_path_= base_path;
login_auth_path_ = base_path + "Auth";
gaia_assertion_url_ = gaia_url.Resolve("/SSO");
}
@@ -259,14 +259,9 @@ scoped_ptr<HttpResponse> FakeSamlIdp::BuildHTMLResponse(
} // namespace
-// Boolean parameter is used to run this test for webview (true) and for
-// iframe (false) GAIA sign in.
class SamlTest : public OobeBaseTest, public testing::WithParamInterface<bool> {
public:
- SamlTest() : saml_load_injected_(false) {
- set_use_webview(GetParam());
- set_initialize_fake_merge_session(false);
- }
+ SamlTest() : saml_load_injected_(false) { use_webview_ = GetParam(); }
~SamlTest() override {}
void SetUpCommandLine(base::CommandLine* command_line) override {
@@ -370,13 +365,13 @@ IN_PROC_BROWSER_TEST_P(SamlTest, SamlUI) {
// Saml flow UI expectations.
JsExpect("$('gaia-signin').classList.contains('full-width')");
- if (!use_webview()) {
+ if (!use_webview_) {
JsExpect("!$('cancel-add-user-button').hidden");
}
// Click on 'cancel'.
content::DOMMessageQueue message_queue; // Observe before 'cancel'.
- if (use_webview()) {
+ if (use_webview_) {
ASSERT_TRUE(content::ExecuteScript(
GetLoginUI()->GetWebContents(),
"$('close-button-item').click();"));
@@ -402,7 +397,7 @@ IN_PROC_BROWSER_TEST_P(SamlTest, CredentialPassingAPI) {
// webview.executeScript and there is no way to control the injection time.
// As a result, this test is flaky and fails about 20% of the time.
// TODO(xiyuan): Re-enable when webview.addContentScript API is ready.
- if (use_webview())
+ if (use_webview_)
return;
fake_saml_idp()->SetLoginHTMLTemplate("saml_api_login.html");
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 50f75fb..31395c2 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -997,29 +997,14 @@ void UserSessionManager::UserProfileInitialized(Profile* profile,
// empty if |transfer_saml_auth_cookies_on_subsequent_login| is true.
const bool transfer_auth_cookies_and_channel_ids_on_first_login =
has_auth_cookies_;
-
- net::URLRequestContextGetter* auth_request_context =
- GetAuthRequestContext();
-
- // Authentication request context may be missing especially if user didn't
- // sign in using GAIA (webview) and webview didn't yet initialize.
- if (auth_request_context) {
- ProfileAuthData::Transfer(
- auth_request_context, profile->GetRequestContext(),
- transfer_auth_cookies_and_channel_ids_on_first_login,
- transfer_saml_auth_cookies_on_subsequent_login,
- base::Bind(
- &UserSessionManager::CompleteProfileCreateAfterAuthTransfer,
- AsWeakPtr(), profile));
- } else {
- // We need to post task so that OnProfileCreated() caller sends out
- // NOTIFICATION_PROFILE_CREATED which marks user profile as initialized.
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(
- &UserSessionManager::CompleteProfileCreateAfterAuthTransfer,
- AsWeakPtr(), profile));
- }
+ ProfileAuthData::Transfer(
+ GetAuthRequestContext(),
+ profile->GetRequestContext(),
+ transfer_auth_cookies_and_channel_ids_on_first_login,
+ transfer_saml_auth_cookies_on_subsequent_login,
+ base::Bind(&UserSessionManager::CompleteProfileCreateAfterAuthTransfer,
+ AsWeakPtr(),
+ profile));
return;
}
@@ -1246,18 +1231,9 @@ void UserSessionManager::RestoreAuthSessionImpl(
OAuth2LoginManagerFactory::GetInstance()->GetForProfile(profile);
login_manager->AddObserver(this);
- net::URLRequestContextGetter* auth_request_context = GetAuthRequestContext();
-
- // Authentication request context may not be available if user was not
- // signing in with GAIA webview (i.e. webview instance hasn't been
- // initialized at all). Use fallback request context.
- if (!auth_request_context) {
- auth_request_context =
- authenticator_->authentication_context()->GetRequestContext();
- }
- login_manager->RestoreSession(auth_request_context, session_restore_strategy_,
- user_context_.GetRefreshToken(),
- user_context_.GetAuthCode());
+ login_manager->RestoreSession(
+ GetAuthRequestContext(), session_restore_strategy_,
+ user_context_.GetRefreshToken(), user_context_.GetAuthCode());
}
void UserSessionManager::InitRlzImpl(Profile* profile, bool disabled) {
@@ -1446,15 +1422,13 @@ void UserSessionManager::UpdateEasyUnlockKeys(const UserContext& user_context) {
net::URLRequestContextGetter*
UserSessionManager::GetAuthRequestContext() const {
- net::URLRequestContextGetter* auth_request_context = nullptr;
+ net::URLRequestContextGetter* auth_request_context = NULL;
if (StartupUtils::IsWebviewSigninEnabled()) {
// Webview uses different partition storage than iframe. We need to get
// cookies from the right storage for url request to get auth token into
// session.
- content::StoragePartition* signin_partition = login::GetSigninPartition();
- if (signin_partition)
- auth_request_context = signin_partition->GetURLRequestContext();
+ auth_request_context = login::GetSigninPartition()->GetURLRequestContext();
} else if (authenticator_.get() && authenticator_->authentication_context()) {
auth_request_context =
authenticator_->authentication_context()->GetRequestContext();
diff --git a/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc b/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc
index c09e3a7..48bdb7b 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc
+++ b/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h"
#include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h"
#include "chrome/browser/chromeos/login/signin_specifics.h"
-#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/login/test/oobe_base_test.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -131,12 +130,9 @@ class OAuth2LoginManagerStateWaiter : public OAuth2LoginManager::Observer {
} // namespace
-// Boolean parameter is used to run this test for webview (true) and for
-// iframe (false) GAIA sign in.
-class OAuth2Test : public OobeBaseTest,
- public testing::WithParamInterface<bool> {
+class OAuth2Test : public OobeBaseTest {
protected:
- OAuth2Test() { set_use_webview(GetParam()); }
+ OAuth2Test() {}
void SetUpCommandLine(base::CommandLine* command_line) override {
OobeBaseTest::SetUpCommandLine(command_line);
@@ -331,17 +327,23 @@ class OAuth2Test : public OobeBaseTest,
void StartNewUserSession(bool wait_for_merge) {
SetupGaiaServerForNewAccount();
SimulateNetworkOnline();
- WaitForGaiaPageLoad();
+ chromeos::WizardController::SkipPostLoginScreensForTesting();
+ chromeos::WizardController* wizard_controller =
+ chromeos::WizardController::default_controller();
+ wizard_controller->SkipToLoginForTesting(LoginScreenContext());
- content::WindowedNotificationObserver session_start_waiter(
- chrome::NOTIFICATION_SESSION_STARTED,
- content::NotificationService::AllSources());
+ content::WindowedNotificationObserver(
+ chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
+ content::NotificationService::AllSources()).Wait();
// Use capitalized and dotted user name on purpose to make sure
// our email normalization kicks in.
GetLoginDisplay()->ShowSigninScreenForCreds(kTestRawAccountId,
kTestAccountPassword);
- session_start_waiter.Wait();
+
+ content::WindowedNotificationObserver(
+ chrome::NOTIFICATION_SESSION_STARTED,
+ content::NotificationService::AllSources()).Wait();
if (wait_for_merge) {
// Wait for the session merge to finish.
@@ -412,7 +414,7 @@ class CookieReader : public base::RefCountedThreadSafe<CookieReader> {
};
// PRE_MergeSession is testing merge session for a new profile.
-IN_PROC_BROWSER_TEST_P(OAuth2Test, PRE_PRE_PRE_MergeSession) {
+IN_PROC_BROWSER_TEST_F(OAuth2Test, PRE_PRE_PRE_MergeSession) {
StartNewUserSession(true);
// Check for existance of refresh token.
ProfileOAuth2TokenService* token_service =
@@ -422,6 +424,7 @@ IN_PROC_BROWSER_TEST_P(OAuth2Test, PRE_PRE_PRE_MergeSession) {
EXPECT_EQ(GetOAuthStatusFromLocalState(kTestAccountId),
user_manager::User::OAUTH2_TOKEN_STATUS_VALID);
+
scoped_refptr<CookieReader> cookie_reader(new CookieReader());
cookie_reader->ReadCookies(profile());
EXPECT_EQ(cookie_reader->GetCookieValue("SID"), kTestSessionSIDCookie);
@@ -432,7 +435,7 @@ IN_PROC_BROWSER_TEST_P(OAuth2Test, PRE_PRE_PRE_MergeSession) {
// that was generated in PRE_PRE_PRE_MergeSession test. In this test, we
// are not running /MergeSession process since the /ListAccounts call confirms
// that the session is not stale.
-IN_PROC_BROWSER_TEST_P(OAuth2Test, PRE_PRE_MergeSession) {
+IN_PROC_BROWSER_TEST_F(OAuth2Test, PRE_PRE_MergeSession) {
SetupGaiaServerForUnexpiredAccount();
SimulateNetworkOnline();
LoginAsExistingUser();
@@ -446,7 +449,7 @@ IN_PROC_BROWSER_TEST_P(OAuth2Test, PRE_PRE_MergeSession) {
// MergeSession test is running merge session process for an existing profile
// that was generated in PRE_PRE_MergeSession test.
-IN_PROC_BROWSER_TEST_P(OAuth2Test, PRE_MergeSession) {
+IN_PROC_BROWSER_TEST_F(OAuth2Test, PRE_MergeSession) {
SetupGaiaServerForExpiredAccount();
SimulateNetworkOnline();
LoginAsExistingUser();
@@ -462,7 +465,7 @@ IN_PROC_BROWSER_TEST_P(OAuth2Test, PRE_MergeSession) {
// MergeSession test is attempting to merge session for an existing profile
// that was generated in PRE_PRE_MergeSession test. This attempt should fail
// since FakeGaia instance isn't configured to return relevant tokens/cookies.
-IN_PROC_BROWSER_TEST_P(OAuth2Test, MergeSession) {
+IN_PROC_BROWSER_TEST_F(OAuth2Test, MergeSession) {
SimulateNetworkOnline();
content::WindowedNotificationObserver(
@@ -532,7 +535,9 @@ class FakeGoogle {
}
// True if we have already served the test page.
- bool IsPageRequested() { return start_event_.IsSignaled(); }
+ bool IsPageRequested () {
+ return start_event_.IsSignaled();
+ }
// Waits until we receive a request to serve the test page.
void WaitForPageRequest() {
@@ -694,7 +699,7 @@ Browser* FindOrCreateVisibleBrowser(Profile* profile) {
return browser;
}
-IN_PROC_BROWSER_TEST_P(MergeSessionTest, PageThrottle) {
+IN_PROC_BROWSER_TEST_F(MergeSessionTest, PageThrottle) {
StartNewUserSession(false);
// Try to open a page from google.com.
@@ -737,7 +742,7 @@ IN_PROC_BROWSER_TEST_P(MergeSessionTest, PageThrottle) {
DVLOG(1) << "Loaded page at the end : " << title;
}
-IN_PROC_BROWSER_TEST_P(MergeSessionTest, XHRThrottle) {
+IN_PROC_BROWSER_TEST_F(MergeSessionTest, XHRThrottle) {
StartNewUserSession(false);
// Wait until we get send merge session request.
@@ -791,7 +796,4 @@ IN_PROC_BROWSER_TEST_P(MergeSessionTest, XHRThrottle) {
EXPECT_TRUE(fake_google_.IsPageRequested());
}
-INSTANTIATE_TEST_CASE_P(OAuth2Suite, OAuth2Test, testing::Bool());
-INSTANTIATE_TEST_CASE_P(MergeSessionSuite, MergeSessionTest, testing::Bool());
-
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/startup_utils.cc b/chrome/browser/chromeos/login/startup_utils.cc
index c136ea3..1a0d47f 100644
--- a/chrome/browser/chromeos/login/startup_utils.cc
+++ b/chrome/browser/chromeos/login/startup_utils.cc
@@ -13,7 +13,6 @@
#include "base/sys_info.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/features/feature_channel.h"
#include "chrome/common/pref_names.h"
@@ -60,7 +59,7 @@ void StartupUtils::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(prefs::kEnrollmentRecoveryRequired, false);
registry->RegisterStringPref(prefs::kInitialLocale, "en-US");
registry->RegisterBooleanPref(prefs::kNewOobe, false);
- registry->RegisterBooleanPref(prefs::kWebviewSigninDisabled, false);
+ registry->RegisterBooleanPref(prefs::kWebviewSigninEnabled, false);
}
// static
@@ -180,41 +179,25 @@ std::string StartupUtils::GetInitialLocale() {
// static
bool StartupUtils::IsWebviewSigninAllowed() {
- return !base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableWebviewSigninFlow);
+ return extensions::GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableWebviewSigninFlow);
}
// static
bool StartupUtils::IsWebviewSigninEnabled() {
- policy::DeviceCloudPolicyManagerChromeOS* policy_manager =
- g_browser_process
- ? g_browser_process->platform_part()
- ->browser_policy_connector_chromeos()
- ->GetDeviceCloudPolicyManager()
- : nullptr;
-
- bool is_remora_or_shark_requisition =
- policy_manager
- ? policy_manager->IsRemoraRequisition() ||
- policy_manager->IsSharkRequisition()
- : false;
-
- bool is_webview_disabled_pref = g_browser_process->local_state()->GetBoolean(
- prefs::kWebviewSigninDisabled);
-
- // TODO(dzhioev): Re-enable webview signin for remora/shark requisition
- // http://crbug.com/464049
- return !is_remora_or_shark_requisition && IsWebviewSigninAllowed() &&
- !is_webview_disabled_pref;
+ return IsWebviewSigninAllowed() &&
+ g_browser_process->local_state()->GetBoolean(
+ prefs::kWebviewSigninEnabled);
}
// static
bool StartupUtils::EnableWebviewSignin(bool is_enabled) {
- if (is_enabled && !IsWebviewSigninAllowed())
+ if (!IsWebviewSigninAllowed())
return false;
- g_browser_process->local_state()->SetBoolean(prefs::kWebviewSigninDisabled,
- !is_enabled);
+ g_browser_process->local_state()->SetBoolean(prefs::kWebviewSigninEnabled,
+ is_enabled);
return true;
}
diff --git a/chrome/browser/chromeos/login/test/oobe_base_test.cc b/chrome/browser/chromeos/login/test/oobe_base_test.cc
index 5aa0eff..5dcc635 100644
--- a/chrome/browser/chromeos/login/test/oobe_base_test.cc
+++ b/chrome/browser/chromeos/login/test/oobe_base_test.cc
@@ -20,7 +20,6 @@
#include "chrome/common/pref_names.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/fake_shill_manager_client.h"
-#include "components/policy/core/common/policy_switches.h"
#include "components/user_manager/fake_user_manager.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -33,19 +32,12 @@
namespace chromeos {
-// static
-const char OobeBaseTest::kFakeUserEmail[] = "fake-email@gmail.com";
-const char OobeBaseTest::kFakeUserPassword[] = "fake-password";
-const char OobeBaseTest::kFakeSIDCookie[] = "fake-SID-cookie";
-const char OobeBaseTest::kFakeLSIDCookie[] = "fake-LSID-cookie";
-
OobeBaseTest::OobeBaseTest()
: fake_gaia_(new FakeGaia()),
network_portal_detector_(NULL),
needs_background_networking_(false),
gaia_frame_parent_("signin-frame"),
- use_webview_(false),
- initialize_fake_merge_session_(true) {
+ use_webview_(false) {
set_exit_when_last_browser_closes(false);
set_chromeos_user_ = false;
}
@@ -58,8 +50,6 @@ void OobeBaseTest::SetUp() {
PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir);
embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
- RegisterAdditionalRequestHandlers();
-
embedded_test_server()->RegisterRequestHandler(
base::Bind(&FakeGaia::HandleRequest, base::Unretained(fake_gaia_.get())));
@@ -77,19 +67,25 @@ void OobeBaseTest::SetUp() {
}
bool OobeBaseTest::SetUpUserDataDirectory() {
- base::FilePath user_data_dir;
- CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
- base::FilePath local_state_path =
- user_data_dir.Append(chrome::kLocalStateFilename);
+ if (use_webview_) {
+ // Fake Dev channel to enable webview signin.
+ scoped_channel_.reset(
+ new extensions::ScopedCurrentChannel(chrome::VersionInfo::CHANNEL_DEV));
- if (!use_webview()) {
- // Set webview disabled flag only when local state file does not exist.
+ base::FilePath user_data_dir;
+ CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
+ base::FilePath local_state_path =
+ user_data_dir.Append(chrome::kLocalStateFilename);
+
+ // Set webview enabled flag only when local state file does not exist.
// Otherwise, we break PRE tests that leave state in it.
if (!base::PathExists(local_state_path)) {
base::DictionaryValue local_state_dict;
-
- // TODO(nkostylev): Fix tests that fail with webview signin.
- local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true);
+ local_state_dict.SetBoolean(prefs::kWebviewSigninEnabled, true);
+ // OobeCompleted to skip controller-pairing-screen which still uses
+ // iframe and ends up in a JS error in oobe page init.
+ // See http://crbug.com/467147
+ local_state_dict.SetBoolean(prefs::kOobeComplete, true);
CHECK(JSONFileValueSerializer(local_state_path)
.Serialize(local_state_dict));
@@ -110,11 +106,6 @@ void OobeBaseTest::SetUpInProcessBrowserTestFixture() {
}
void OobeBaseTest::SetUpOnMainThread() {
- if (initialize_fake_merge_session()) {
- fake_gaia_->SetFakeMergeSessionParams(kFakeUserEmail, kFakeSIDCookie,
- kFakeLSIDCookie);
- }
-
// Restart the thread as the sandbox host process has already been spawned.
embedded_test_server()->RestartThreadAndListen();
@@ -132,7 +123,6 @@ void OobeBaseTest::TearDownOnMainThread() {
base::Bind(&chrome::AttemptExit));
content::RunMessageLoop();
}
- EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
ExtensionApiTest::TearDownOnMainThread();
}
@@ -146,14 +136,14 @@ void OobeBaseTest::SetUpCommandLine(base::CommandLine* command_line) {
command_line->AppendSwitch(::switches::kDisableBackgroundNetworking);
command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
- GURL gaia_url = gaia_https_forwarder_->GetURL(std::string());
+ GURL gaia_url = gaia_https_forwarder_->GetURL("");
command_line->AppendSwitchASCII(::switches::kGaiaUrl, gaia_url.spec());
command_line->AppendSwitchASCII(::switches::kLsoUrl, gaia_url.spec());
command_line->AppendSwitchASCII(::switches::kGoogleApisUrl,
gaia_url.spec());
fake_gaia_->Initialize();
- fake_gaia_->set_issue_oauth_code_cookie(use_webview());
+ fake_gaia_->set_issue_oauth_code_cookie(use_webview_);
}
void OobeBaseTest::InitHttpsForwarders() {
@@ -162,9 +152,6 @@ void OobeBaseTest::InitHttpsForwarders() {
ASSERT_TRUE(gaia_https_forwarder_->Start());
}
-void OobeBaseTest::RegisterAdditionalRequestHandlers() {
-}
-
void OobeBaseTest::SimulateNetworkOffline() {
NetworkPortalDetector::CaptivePortalState offline_state;
offline_state.status = NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_OFFLINE;
@@ -230,32 +217,11 @@ WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() {
controller->login_display());
}
-void OobeBaseTest::WaitForGaiaPageLoad() {
- WaitForSigninScreen();
-
- if (!use_webview())
- return;
-
- ASSERT_TRUE(content::ExecuteScript(
- GetLoginUI()->GetWebContents(),
- "$('gaia-signin').gaiaAuthHost_.addEventListener('ready',"
- "function() {"
- "window.domAutomationController.setAutomationId(0);"
- "window.domAutomationController.send('GaiaReady');"
- "});"));
-
- content::DOMMessageQueue message_queue;
- std::string message;
- do {
- ASSERT_TRUE(message_queue.WaitForMessage(&message));
- } while (message != "\"GaiaReady\"");
-}
-
void OobeBaseTest::WaitForSigninScreen() {
WizardController* wizard_controller = WizardController::default_controller();
- if (wizard_controller)
+ if (wizard_controller) {
wizard_controller->SkipToLoginForTesting(LoginScreenContext());
-
+ }
WizardController::SkipPostLoginScreensForTesting();
login_screen_load_observer_->Wait();
diff --git a/chrome/browser/chromeos/login/test/oobe_base_test.h b/chrome/browser/chromeos/login/test/oobe_base_test.h
index 7c2f592..6933a01 100644
--- a/chrome/browser/chromeos/login/test/oobe_base_test.h
+++ b/chrome/browser/chromeos/login/test/oobe_base_test.h
@@ -34,22 +34,9 @@ class NetworkPortalDetectorTestImpl;
// Base class for OOBE, login, SAML and Kiosk tests.
class OobeBaseTest : public ExtensionApiTest {
public:
- // Default fake user email and password, may be used by tests.
-
- static const char kFakeUserEmail[];
- static const char kFakeUserPassword[];
-
- // FakeGaia is configured to return these cookies for kFakeUserEmail.
- static const char kFakeSIDCookie[];
- static const char kFakeLSIDCookie[];
-
OobeBaseTest();
~OobeBaseTest() override;
- // Subclasses may register their own custom request handlers that will
- // process requests prior it gets handled by FakeGaia instance.
- virtual void RegisterAdditionalRequestHandlers();
-
protected:
// InProcessBrowserTest overrides.
void SetUp() override;
@@ -73,23 +60,12 @@ class OobeBaseTest : public ExtensionApiTest {
// Checks JavaScript |expression| in login screen.
void JsExpect(const std::string& expression);
- bool use_webview() { return use_webview_; }
- void set_use_webview(bool use_webview) { use_webview_ = use_webview; }
-
- bool initialize_fake_merge_session() {
- return initialize_fake_merge_session_;
- }
- void set_initialize_fake_merge_session(bool value) {
- initialize_fake_merge_session_ = value;
- }
-
// Returns chrome://oobe WebUI.
content::WebUI* GetLoginUI();
// Returns login display.
WebUILoginDisplay* GetLoginDisplay();
- void WaitForGaiaPageLoad();
void WaitForSigninScreen();
void ExecuteJsInSigninFrame(const std::string& js);
void SetSignFormField(const std::string& field_id,
@@ -107,7 +83,6 @@ class OobeBaseTest : public ExtensionApiTest {
scoped_ptr<HTTPSForwarder> gaia_https_forwarder_;
std::string gaia_frame_parent_;
bool use_webview_;
- bool initialize_fake_merge_session_;
DISALLOW_COPY_AND_ASSIGN(OobeBaseTest);
};
diff --git a/chrome/browser/chromeos/login/webview_login_browsertest.cc b/chrome/browser/chromeos/login/webview_login_browsertest.cc
index b7d3caa..c3163b2 100644
--- a/chrome/browser/chromeos/login/webview_login_browsertest.cc
+++ b/chrome/browser/chromeos/login/webview_login_browsertest.cc
@@ -10,27 +10,57 @@
#include "content/public/test/test_utils.h"
namespace chromeos {
+namespace {
+const char kFakeUserEmail[] = "fake-email@gmail.com";
+const char kFakeUserPassword[] = "fake-password";
+const char kFakeSIDCookie[] = "fake-SID-cookie";
+const char kFakeLSIDCookie[] = "fake-LSID-cookie";
+}
class WebviewLoginTest : public OobeBaseTest {
public:
- WebviewLoginTest() { set_use_webview(true); }
+ WebviewLoginTest() { use_webview_ = true; }
~WebviewLoginTest() override {}
+ void SetUpOnMainThread() override {
+ fake_gaia_->SetFakeMergeSessionParams(kFakeUserEmail, kFakeSIDCookie,
+ kFakeLSIDCookie);
+
+ OobeBaseTest::SetUpOnMainThread();
+ }
+
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(switches::kOobeSkipPostLogin);
OobeBaseTest::SetUpCommandLine(command_line);
}
+ void WaitForGaiaPageLoaded() {
+ WaitForSigninScreen();
+
+ ASSERT_TRUE(content::ExecuteScript(
+ GetLoginUI()->GetWebContents(),
+ "$('gaia-signin').gaiaAuthHost_.addEventListener('ready',"
+ "function() {"
+ "window.domAutomationController.setAutomationId(0);"
+ "window.domAutomationController.send('GaiaReady');"
+ "});"));
+
+ content::DOMMessageQueue message_queue;
+ std::string message;
+ ASSERT_TRUE(message_queue.WaitForMessage(&message));
+ EXPECT_EQ("\"GaiaReady\"", message);
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(WebviewLoginTest);
};
IN_PROC_BROWSER_TEST_F(WebviewLoginTest, Basic) {
- WaitForGaiaPageLoad();
+ WaitForGaiaPageLoaded();
JsExpect("$('close-button-item').hidden");
- SetSignFormField("identifier", OobeBaseTest::kFakeUserEmail);
+ SetSignFormField("identifier", kFakeUserEmail);
ExecuteJsInSigninFrame("document.getElementById('nextButton').click();");
JsExpect("$('close-button-item').hidden");
@@ -39,21 +69,21 @@ IN_PROC_BROWSER_TEST_F(WebviewLoginTest, Basic) {
chrome::NOTIFICATION_SESSION_STARTED,
content::NotificationService::AllSources());
- SetSignFormField("password", OobeBaseTest::kFakeUserPassword);
+ SetSignFormField("password", kFakeUserPassword);
ExecuteJsInSigninFrame("document.getElementById('nextButton').click();");
session_start_waiter.Wait();
}
IN_PROC_BROWSER_TEST_F(WebviewLoginTest, BackButton) {
- WaitForGaiaPageLoad();
+ WaitForGaiaPageLoaded();
// Start: no back button, first page.
JsExpect("$('back-button-item').hidden");
JsExpect("$('signin-frame').src.indexOf('#identifier') != -1");
// Next step: back button active, second page.
- SetSignFormField("identifier", OobeBaseTest::kFakeUserEmail);
+ SetSignFormField("identifier", kFakeUserEmail);
ExecuteJsInSigninFrame("document.getElementById('nextButton').click();");
JsExpect("!$('back-button-item').hidden");
JsExpect("$('signin-frame').src.indexOf('#challengepassword') != -1");
@@ -73,7 +103,7 @@ IN_PROC_BROWSER_TEST_F(WebviewLoginTest, BackButton) {
chrome::NOTIFICATION_SESSION_STARTED,
content::NotificationService::AllSources());
- SetSignFormField("password", OobeBaseTest::kFakeUserPassword);
+ SetSignFormField("password", kFakeUserPassword);
ExecuteJsInSigninFrame("document.getElementById('nextButton').click();");
session_start_waiter.Wait();
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
index 3b71746..658a78a 100644
--- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
+++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -7,8 +7,6 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
-#include "base/json/json_file_value_serializer.h"
-#include "base/path_service.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/pref_service_factory.h"
@@ -50,7 +48,6 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
-#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -968,11 +965,7 @@ IN_PROC_BROWSER_TEST_F(WizardControllerBrokenLocalStateTest,
ASSERT_EQ(1, fake_session_manager_client()->start_device_wipe_call_count());
}
-// Boolean parameter is used to run this test for webview (true) and for
-// iframe (false) GAIA sign in.
-class WizardControllerProxyAuthOnSigninTest
- : public WizardControllerTest,
- public testing::WithParamInterface<bool> {
+class WizardControllerProxyAuthOnSigninTest : public WizardControllerTest {
protected:
WizardControllerProxyAuthOnSigninTest()
: proxy_server_(net::SpawnedTestServer::TYPE_BASIC_AUTH_PROXY,
@@ -998,32 +991,6 @@ class WizardControllerProxyAuthOnSigninTest
proxy_server_.host_port_pair().ToString());
}
- bool SetUpUserDataDirectory() override {
- base::FilePath user_data_dir;
- CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
- base::FilePath local_state_path =
- user_data_dir.Append(chrome::kLocalStateFilename);
-
- // Set webview disabled flag only when local state file does not exist.
- // Otherwise, we break PRE tests that leave state in it.
- if (!base::PathExists(local_state_path)) {
- base::DictionaryValue local_state_dict;
-
- if (!GetParam())
- local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true);
-
- // TODO(paulmeyer): Re-enable webview version of this test
- // (drop this condition) once http://crbug.com/452452 is fixed.
- if (GetParam())
- local_state_dict.SetBoolean(prefs::kWebviewSigninDisabled, true);
-
- CHECK(JSONFileValueSerializer(local_state_path)
- .Serialize(local_state_dict));
- }
-
- return WizardControllerTest::SetUpUserDataDirectory();
- }
-
net::SpawnedTestServer& proxy_server() { return proxy_server_; }
private:
@@ -1032,7 +999,7 @@ class WizardControllerProxyAuthOnSigninTest
DISALLOW_COPY_AND_ASSIGN(WizardControllerProxyAuthOnSigninTest);
};
-IN_PROC_BROWSER_TEST_P(WizardControllerProxyAuthOnSigninTest,
+IN_PROC_BROWSER_TEST_F(WizardControllerProxyAuthOnSigninTest,
ProxyAuthDialogOnSigninScreen) {
content::WindowedNotificationObserver auth_needed_waiter(
chrome::NOTIFICATION_AUTH_NEEDED,
@@ -1044,10 +1011,6 @@ IN_PROC_BROWSER_TEST_P(WizardControllerProxyAuthOnSigninTest,
auth_needed_waiter.Wait();
}
-INSTANTIATE_TEST_CASE_P(WizardControllerProxyAuthOnSigninSuite,
- WizardControllerProxyAuthOnSigninTest,
- testing::Bool());
-
class WizardControllerKioskFlowTest : public WizardControllerFlowTest {
protected:
WizardControllerKioskFlowTest() {}
diff --git a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
index 03b0504..dabc1f7 100644
--- a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
+++ b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
-#include "chrome/browser/chromeos/login/test/oobe_base_test.h"
#include "chrome/browser/chromeos/login/ui/webui_login_display.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
@@ -28,6 +27,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
+#include "google_apis/gaia/fake_gaia.h"
#include "google_apis/gaia/gaia_switches.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/http/http_status_code.h"
@@ -81,35 +81,52 @@ struct BlockingLoginTestParam {
};
class BlockingLoginTest
- : public OobeBaseTest,
+ : public InProcessBrowserTest,
public content::NotificationObserver,
public testing::WithParamInterface<BlockingLoginTestParam> {
public:
BlockingLoginTest() : profile_added_(NULL) {}
void SetUpCommandLine(base::CommandLine* command_line) override {
- OobeBaseTest::SetUpCommandLine(command_line);
-
+ // Initialize the test server early, so that we can use its base url for
+ // the command line flags.
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
+
+ // Use the login manager screens and the gaia auth extension.
+ command_line->AppendSwitch(switches::kLoginManager);
+ command_line->AppendSwitch(switches::kForceLoginManagerInTests);
+ command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
command_line->AppendSwitchASCII(::switches::kAuthExtensionPath,
"gaia_auth");
+
+ // Redirect requests to gaia and the policy server to the test server.
+ command_line->AppendSwitchASCII(::switches::kGaiaUrl,
+ embedded_test_server()->base_url().spec());
+ command_line->AppendSwitchASCII(::switches::kLsoUrl,
+ embedded_test_server()->base_url().spec());
command_line->AppendSwitchASCII(
policy::switches::kDeviceManagementUrl,
embedded_test_server()->GetURL("/device_management").spec());
}
void SetUpOnMainThread() override {
+ fake_gaia_.Initialize();
+
+ embedded_test_server()->RegisterRequestHandler(
+ base::Bind(&BlockingLoginTest::HandleRequest, base::Unretained(this)));
+ embedded_test_server()->RegisterRequestHandler(
+ base::Bind(&FakeGaia::HandleRequest, base::Unretained(&fake_gaia_)));
+
registrar_.Add(this,
chrome::NOTIFICATION_PROFILE_ADDED,
content::NotificationService::AllSources());
-
- OobeBaseTest::SetUpOnMainThread();
}
void TearDownOnMainThread() override {
RunUntilIdle();
EXPECT_TRUE(responses_.empty());
STLDeleteElements(&responses_);
- OobeBaseTest::TearDownOnMainThread();
+ EXPECT_TRUE(embedded_test_server()->ShutdownAndWaitUntilComplete());
}
void Observe(int type,
@@ -228,14 +245,10 @@ class BlockingLoginTest
}
protected:
- void RegisterAdditionalRequestHandlers() override {
- embedded_test_server()->RegisterRequestHandler(
- base::Bind(&BlockingLoginTest::HandleRequest, base::Unretained(this)));
- }
-
Profile* profile_added_;
private:
+ FakeGaia fake_gaia_;
std::vector<net::test_server::HttpResponse*> responses_;
content::NotificationRegistrar registrar_;
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index f6967bd..47dd710 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -285,11 +285,32 @@ cr.define('extensions', function() {
this.extensions_ = extensions;
this.showExtensionNodes_();
resolve();
+
+ // |onUpdateFinished_| should be called after the list becomes visible
+ // in extensions.js. |resolve| is async, so |onUpdateFinished_|
+ // shouldn't be called directly.
+ this.extensionsUpdated_.then(this.onUpdateFinished_.bind(this));
}.bind(this));
}.bind(this));
return this.extensionsUpdated_;
},
+ /** Updates elements that need to be visible in order to update properly. */
+ onUpdateFinished_: function() {
+ assert(!this.hidden);
+ assert(!this.parentElement.hidden);
+
+ this.updateFocusableElements();
+
+ var idToHighlight = this.getIdQueryParam_();
+ if (idToHighlight && $(idToHighlight))
+ this.scrollToNode_(idToHighlight);
+
+ var idToOpenOptions = this.getOptionsQueryParam_();
+ if (idToOpenOptions && $(idToOpenOptions))
+ this.showEmbeddedExtensionOptions_(idToOpenOptions, true);
+ },
+
/** @return {number} The number of extensions being displayed. */
getNumExtensions: function() {
return this.extensions_.length;
@@ -339,14 +360,6 @@ cr.define('extensions', function() {
assertInstanceof(node, ExtensionFocusRow).destroy();
}
}
-
- var idToHighlight = this.getIdQueryParam_();
- if (idToHighlight && $(idToHighlight))
- this.scrollToNode_(idToHighlight);
-
- var idToOpenOptions = this.getOptionsQueryParam_();
- if (idToOpenOptions && $(idToOpenOptions))
- this.showEmbeddedExtensionOptions_(idToOpenOptions, true);
},
/** Updates each row's focusable elements without rebuilding the grid. */
diff --git a/chrome/browser/resources/extensions/extensions.js b/chrome/browser/resources/extensions/extensions.js
index 211ecba..3eba3da 100644
--- a/chrome/browser/resources/extensions/extensions.js
+++ b/chrome/browser/resources/extensions/extensions.js
@@ -263,7 +263,6 @@ cr.define('extensions', function() {
var hasExtensions = extensionList.getNumExtensions() != 0;
$('no-extensions').hidden = hasExtensions;
$('extension-list-wrapper').hidden = !hasExtensions;
- $('extension-settings-list').updateFocusableElements();
}.bind(this));
},
diff --git a/chrome/browser/resources/settings/a11y_page/a11y_page_style.html b/chrome/browser/resources/settings/a11y_page/a11y_page.css
index ff6c3bd..2277ed3 100644
--- a/chrome/browser/resources/settings/a11y_page/a11y_page_style.html
+++ b/chrome/browser/resources/settings/a11y_page/a11y_page.css
@@ -1,7 +1,7 @@
-<link rel="import" href="chrome://resources/polymer/polymer/polymer.html">
-<link rel="import" href="chrome://resources/polymer/core-style/core-style.html">
+/* Copyright 2015 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file. */
-<core-style id="a11yPageStyle">
.autoclick-delay-label {
-webkit-margin-end: 0;
-webkit-margin-start: 40px;
@@ -21,4 +21,3 @@
.more-a11y-link {
margin-bottom: 10px;
}
-</core-style>
diff --git a/chrome/browser/resources/settings/a11y_page/a11y_page.html b/chrome/browser/resources/settings/a11y_page/a11y_page.html
index 8076bbd..cf7a15a 100644
--- a/chrome/browser/resources/settings/a11y_page/a11y_page.html
+++ b/chrome/browser/resources/settings/a11y_page/a11y_page.html
@@ -5,12 +5,11 @@
<link rel="import" href="chrome://resources/cr_elements/cr_dropdown_menu/cr_dropdown_menu.html">
<link rel="import" href="chrome://md-settings/settings_page/settings_page_header.html">
<link rel="import" href="chrome://md-settings/checkbox/checkbox.html">
-<link rel="import" href="a11y_page_style.html">
<polymer-element name="cr-settings-a11y-page">
<template>
<link rel="stylesheet" href="chrome://md-settings/settings_page/settings_page.css">
- <core-style ref="a11yPageStyle"></core-style>
+ <link rel="stylesheet" href="a11y_page.css">
<paper-shadow layout vertical cross-fade>
<div class="more-a11y-link">
<a href="https://chrome.google.com/webstore/category/collection/accessibility"
diff --git a/chrome/browser/resources/settings/checkbox/checkbox_style.html b/chrome/browser/resources/settings/checkbox/checkbox.css
index 550eda4..0acbdbd 100644
--- a/chrome/browser/resources/settings/checkbox/checkbox_style.html
+++ b/chrome/browser/resources/settings/checkbox/checkbox.css
@@ -1,7 +1,7 @@
-<link rel="import" href="chrome://resources/polymer/polymer/polymer.html">
-<link rel="import" href="chrome://resources/polymer/core-style/core-style.html">
+/* Copyright 2015 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file. */
-<core-style id="checkboxStyle">
#checkbox {
-webkit-margin-end: 10px;
}
@@ -17,4 +17,3 @@ core-label {
-webkit-margin-start: 10px;
color: rgba(0, 0, 0, .5);
}
-</core-style>
diff --git a/chrome/browser/resources/settings/checkbox/checkbox.html b/chrome/browser/resources/settings/checkbox/checkbox.html
index e4e884c..e660fdb 100644
--- a/chrome/browser/resources/settings/checkbox/checkbox.html
+++ b/chrome/browser/resources/settings/checkbox/checkbox.html
@@ -2,11 +2,10 @@
<link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html">
<link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.html">
<link rel="import" href="chrome://md-settings/pref_tracker/pref_tracker.html">
-<link rel="import" href="checkbox_style.html">
<polymer-element name="cr-settings-checkbox">
<template>
- <core-style ref="checkboxStyle"></core-style>
+ <link rel="stylesheet" href="checkbox.css">
<cr-events id="events"></cr-events>
<cr-settings-pref-tracker pref="{{pref}}"></cr-settings-pref-tracker>
diff --git a/chrome/browser/resources/settings/settings_resources.grd b/chrome/browser/resources/settings/settings_resources.grd
index 5ceed83..1012730 100644
--- a/chrome/browser/resources/settings/settings_resources.grd
+++ b/chrome/browser/resources/settings/settings_resources.grd
@@ -20,8 +20,8 @@
type="chrome_html"
flattenhtml="true"
allowexternalscript="true" />
- <structure name="IDR_SETTINGS_A11Y_PAGE_STYLE_HTML"
- file="a11y_page/a11y_page_style.html"
+ <structure name="IDR_SETTINGS_A11Y_PAGE_CSS"
+ file="a11y_page/a11y_page.css"
type="chrome_html" />
<structure name="IDR_SETTINGS_CHECKBOX_HTML"
file="checkbox/checkbox.html"
@@ -29,8 +29,8 @@
<structure name="IDR_SETTINGS_CHECKBOX_JS"
file="checkbox/checkbox.js"
type="chrome_html" />
- <structure name="IDR_SETTINGS_CHECKBOX_STYLE_HTML"
- file="checkbox/checkbox_style.html"
+ <structure name="IDR_SETTINGS_CHECKBOX_CSS"
+ file="checkbox/checkbox.css"
type="chrome_html" />
<structure name="IDR_SETTINGS_CR_SETTINGS_DRAWER_STYLE_HTML"
file="settings_drawer/settings_drawer_style.html"
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 9d65d26..0657d6f 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1081,10 +1081,6 @@
'browser/chromeos/login/screenshot_testing/screenshot_tester.h',
'browser/chromeos/login/screenshot_testing/screenshot_testing_mixin.cc',
'browser/chromeos/login/screenshot_testing/screenshot_testing_mixin.h',
- 'browser/chromeos/login/test/https_forwarder.cc',
- 'browser/chromeos/login/test/https_forwarder.h',
- 'browser/chromeos/login/test/oobe_base_test.cc',
- 'browser/chromeos/login/test/oobe_base_test.h',
'browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc',
'browser/chromeos/login/users/wallpaper/wallpaper_manager_test_utils.cc',
'browser/chromeos/login/users/wallpaper/wallpaper_manager_test_utils.h',
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index c3678fc..2966dbf 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1919,8 +1919,9 @@ const char kConsumerManagementStage[] = "consumer_management.stage";
const char kNewOobe[] = "NewOobe";
// A boolean pref. If set to true, experimental webview based signin flow
-// is deactivated.
-const char kWebviewSigninDisabled[] = "webview_signin_disabled";
+// activated.
+const char kWebviewSigninEnabled[] =
+ "webview_signin_enabled";
#endif // defined(OS_CHROMEOS)
// Whether there is a Flash version installed that supports clearing LSO data.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 3badee1..b40b4f0 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -677,7 +677,7 @@ extern const char kLogoutStartedLast[];
extern const char kConsumerManagementStage[];
extern const char kNewOobe[];
extern const char kConsumerManagementEnrollmentStage[];
-extern const char kWebviewSigninDisabled[];
+extern const char kWebviewSigninEnabled[];
#endif // defined(OS_CHROMEOS)
extern const char kClearPluginLSODataEnabled[];
diff --git a/chrome/interactive_ui_tests.isolate b/chrome/interactive_ui_tests.isolate
index 9823d0c..01c2675 100644
--- a/chrome/interactive_ui_tests.isolate
+++ b/chrome/interactive_ui_tests.isolate
@@ -130,7 +130,6 @@
'<(PRODUCT_DIR)/nacl_helper',
'<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
'<(PRODUCT_DIR)/resources/chromeos/',
- 'browser/chromeos/login/test/https_forwarder.py',
],
},
}],
diff --git a/chrome/test/data/notifications/platform_notification_service.html b/chrome/test/data/notifications/platform_notification_service.html
index d0b4124..7c4eb86 100644
--- a/chrome/test/data/notifications/platform_notification_service.html
+++ b/chrome/test/data/notifications/platform_notification_service.html
@@ -54,10 +54,7 @@
body: 'Contents',
tag: 'replace-id',
icon: 'icon.png',
- silent: true,
- data: [
- { property: 'value' }
- ]
+ silent: true
});
}