diff options
author | magjed <magjed@chromium.org> | 2015-04-22 04:38:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-22 11:38:22 +0000 |
commit | 8de03166a12edeb736e0f901d4bfa0077a6caede (patch) | |
tree | fa4b06538cee363cb622453df60d12aaa9dc60ab | |
parent | ee9a62bc57b4acb1ec509ccd637693453bb35809 (diff) | |
download | chromium_src-8de03166a12edeb736e0f901d4bfa0077a6caede.zip chromium_src-8de03166a12edeb736e0f901d4bfa0077a6caede.tar.gz chromium_src-8de03166a12edeb736e0f901d4bfa0077a6caede.tar.bz2 |
Revert of Add browser test for RestoreOnStartup[URLs] on Chrome OS (patchset #1 id:1 of https://codereview.chromium.org/1099063003/)
Reason for revert:
Speculatively revert to address Linux ChromiumOS Tests browser_tests failure:
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/1742
browser_tests
RestoreOnStartupTestChromeOS.PRE_LogInAndVerify 596 disabled 10 flaky failed 2
failures:
RestoreOnStartupTestChromeOS.LogInAndVerify
RestoreOnStartupTestChromeOS.PRE_LogInAndVerify
[385/509] RestoreOnStartupTestChromeOS.LogInAndVerify (SKIPPED)
[ RUN ] RestoreOnStartupTestChromeOS.PRE_LogInAndVerify
[ FATAL ] ../../testing/gtest/include/gtest/gtest.h:1849:: Condition parameter_ != NULL failed. GetParam() can only be called inside a value-parameterized test -- did you intend to write TEST_P instead of TEST_F?
Received signal 6
#0 0x7ff3af22e6de base::debug::StackTrace::StackTrace()
#1 0x7ff3af22e21f base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7ff3abc5dcb0 <unknown>
#3 0x7ff3a78320d5 gsignal
#4 0x7ff3a783583b abort
#5 0x00000074f9d9 testing::internal::posix::Abort()
#6 0x0000024055b0 testing::internal::GTestLog::~GTestLog()
#7 0x0000007477b3 testing::WithParamInterface<>::GetParam()
#8 0x0000012ecb31 policy::LoginPolicyTestBase::LoginPolicyTestBase()
#9 0x0000012fc025 policy::RestoreOnStartupTestChromeOS::RestoreOnStartupTestChromeOS()
#10 0x0000012fd18c policy::RestoreOnStartupTestChromeOS_PRE_LogInAndVerify_Test::RestoreOnStartupTestChromeOS_PRE_LogInAndVerify_Test()
#11 0x0000012fd117 testing::internal::TestFactoryImpl<>::CreateTest()
#12 0x0000007009ca _ZN7testing8internal12InvokeHelperIvNSt3tr15tupleIJEEEE12InvokeMethodIN10extensions42BluetoothPrivateApiTest_CancelPairing_TestEMNS7_23BluetoothPrivateApiTestEFvvEEEvPT_T0_RKS4_
#13 0x00000241ab2e testing::internal::HandleExceptionsInMethodIfSupported<>()
#14 0x000002410383 testing::TestInfo::Run()
#15 0x00000241094a testing::TestCase::Run()
#16 0x000002415ccc testing::internal::UnitTestImpl::RunAllTests()
#17 0x00000242c01a testing::internal::HandleSehExceptionsInMethodIfSupported<>()
#18 0x00000241bf4e testing::internal::HandleExceptionsInMethodIfSupported<>()
#19 0x00000241596f testing::UnitTest::Run()
#20 0x0000022d95e1 RUN_ALL_TESTS()
#21 0x0000022d8647 base::TestSuite::Run()
#22 0x0000010d2b72 ChromeBrowserTestSuiteRunner::RunTestSuite()
#23 0x00000224de78 (anonymous namespace)::ChromeTestLauncherDelegate::RunTestSuite()
#24 0x000004c38ed5 content::LaunchTests()
#25 0x00000224ddb9 LaunchChromeTests()
#26 0x0000010d2ad8 main
#27 0x7ff3a781d76d __libc_start_main
#28 0x000000672fe9 <unknown>
r8: 00007ff3a51dc8c0 r9: 00007ff3a51dc8c0 r10: 0000000000000008 r11: 0000000000000202
r12: 0000000000672fc0 r13: 00007fffdd71f330 r14: 0000000000000000 r15: 0000000000000000
di: 0000000000005662 si: 0000000000005662 bp: 00007fffdd71e270 bx: 0000000000000000
dx: 0000000000000006 ax: 0000000000000000 cx: ffffffffffffffff sp: 00007fffdd71e138
ip: 00007ff3a78320d5 efl: 0000000000000202 cgf: 0000000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
Original issue's description:
> Add browser test for RestoreOnStartup[URLs] on Chrome OS
>
> Ladies and gentlemen, this CL brings you the long-awaited end-to-end
> browser test for RRestoreOnStartup and RestoreOnStartupURLs, at least
> on Chrome OS.
>
> BUG=477145
> TEST=New browser test
>
> Committed: https://crrev.com/641bb06057cf18e518a96edaadaae42411341905
> Cr-Commit-Position: refs/heads/master@{#326261}
TBR=mnissler@chromium.org,bartfab@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=477145
Review URL: https://codereview.chromium.org/1103493003
Cr-Commit-Position: refs/heads/master@{#326272}
-rw-r--r-- | chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc | 97 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 1 |
2 files changed, 0 insertions, 98 deletions
diff --git a/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc b/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc deleted file mode 100644 index 81bb056..0000000 --- a/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc +++ /dev/null @@ -1,97 +0,0 @@ -// 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. - -#include "base/command_line.h" -#include "base/macros.h" -#include "base/memory/scoped_ptr.h" -#include "base/values.h" -#include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/chromeos/policy/login_policy_test_base.h" -#include "chrome/browser/prefs/session_startup_pref.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_list.h" -#include "chrome/browser/ui/host_desktop.h" -#include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/common/chrome_switches.h" -#include "content/public/browser/notification_service.h" -#include "content/public/browser/web_contents.h" -#include "content/public/test/test_utils.h" -#include "policy/policy_constants.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "url/gurl.h" - -namespace policy { - -namespace { -const char kStartUpURL1[] = "chrome://chrome/"; -const char kStartUpURL2[] = "chrome://version/"; -} - -// Verifies that the |kRestoreOnStartup| and |kRestoreOnStartupURLs| policies -// are honored on Chrome OS. -class RestoreOnStartupTestChromeOS : public LoginPolicyTestBase { - public: - RestoreOnStartupTestChromeOS(); - - // LoginPolicyTestBase: - void SetUpCommandLine(base::CommandLine* command_line) override; - scoped_ptr<base::DictionaryValue> GetMandatoryPoliciesValue() const override; - - void LogInAndVerifyStartUpURLs(); - - private: - DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupTestChromeOS); -}; - -RestoreOnStartupTestChromeOS::RestoreOnStartupTestChromeOS() { -} - -void RestoreOnStartupTestChromeOS::SetUpCommandLine( - base::CommandLine* command_line) { - LoginPolicyTestBase::SetUpCommandLine(command_line); - command_line->AppendSwitch(switches::kDisableChildAccountDetection); -} - -scoped_ptr<base::DictionaryValue> -RestoreOnStartupTestChromeOS::GetMandatoryPoliciesValue() const { - scoped_ptr<base::DictionaryValue> policy(new base::DictionaryValue); - policy->SetInteger(key::kRestoreOnStartup, - SessionStartupPref::kPrefValueURLs); - scoped_ptr<base::ListValue> urls(new base::ListValue); - urls->AppendString(kStartUpURL1); - urls->AppendString(kStartUpURL2); - policy->Set(key::kRestoreOnStartupURLs, urls.Pass()); - return policy; -} - -void RestoreOnStartupTestChromeOS::LogInAndVerifyStartUpURLs() { - LogIn(kAccountId, kAccountPassword); - - const BrowserList* const browser_list = - BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); - ASSERT_EQ(1U, browser_list->size()); - const Browser* const browser = browser_list->get(0); - ASSERT_TRUE(browser); - const TabStripModel* tabs = browser->tab_strip_model(); - ASSERT_TRUE(tabs); - ASSERT_EQ(2, tabs->count()); - EXPECT_EQ(GURL(kStartUpURL1), tabs->GetWebContentsAt(0)->GetURL()); - EXPECT_EQ(GURL(kStartUpURL2), tabs->GetWebContentsAt(1)->GetURL()); -} - -// Verify that the policies are honored on a new user's login. -IN_PROC_BROWSER_TEST_F(RestoreOnStartupTestChromeOS, PRE_LogInAndVerify) { - SkipToLoginScreen(); - LogInAndVerifyStartUpURLs(); -} - -// Verify that the policies are honored on an existing user's login. -IN_PROC_BROWSER_TEST_F(RestoreOnStartupTestChromeOS, LogInAndVerify) { - content::WindowedNotificationObserver( - chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, - content::NotificationService::AllSources()).Wait(); - LogInAndVerifyStartUpURLs(); -} - -} // namespace policy diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index aafe8f5..fdc032a 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -740,7 +740,6 @@ 'browser/chromeos/policy/login_screen_default_policy_browsertest.cc', 'browser/chromeos/policy/policy_cert_verifier_browsertest.cc', 'browser/chromeos/policy/power_policy_browsertest.cc', - 'browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc', 'browser/chromeos/policy/user_cloud_external_data_manager_browsertest.cc', 'browser/chromeos/policy/user_cloud_policy_manager_chromeos_browsertest.cc', 'browser/chromeos/policy/variations_service_policy_browsertest.cc', |