diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 21:48:37 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 21:48:37 +0000 |
commit | b158c097e0d0af3ccc3c836a2f3c13ac35686549 (patch) | |
tree | d4529d92ff82da15923b99f4f00d53057f37dba1 | |
parent | 211a3f36ec6238cee49cea6e9801ab444d238871 (diff) | |
download | chromium_src-b158c097e0d0af3ccc3c836a2f3c13ac35686549.zip chromium_src-b158c097e0d0af3ccc3c836a2f3c13ac35686549.tar.gz chromium_src-b158c097e0d0af3ccc3c836a2f3c13ac35686549.tar.bz2 |
Fix AutofillDialogCocoaBrowserTest, AutofillMetricsTest.
BUG=242659, 234008
TEST=Mac 64 tester bot doesn't time out
Review URL: https://chromiumcodereview.appspot.com/15840012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202659 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm | 9 | ||||
-rw-r--r-- | components/autofill/browser/autofill_metrics_unittest.cc | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm index f6f5165..888087f 100644 --- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm +++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa_browsertest.mm @@ -10,6 +10,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/in_process_browser_test.h" +#include "components/autofill/browser/autofill_common_test.h" #include "components/autofill/common/form_data.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_view.h" @@ -77,6 +78,9 @@ class AutofillDialogCocoaBrowserTest : public InProcessBrowserTest { virtual ~AutofillDialogCocoaBrowserTest() {} virtual void SetUpOnMainThread() OVERRIDE { + // Ensure Mac OS X does not pop up a modal dialog for the Address Book. + autofill::test::DisableSystemServices(browser()->profile()); + FormFieldData field; field.autocomplete_attribute = "cc-number"; FormData form_data; @@ -103,9 +107,8 @@ class AutofillDialogCocoaBrowserTest : public InProcessBrowserTest { DISALLOW_COPY_AND_ASSIGN(AutofillDialogCocoaBrowserTest); }; -// The following test fails under ASAN. Disabling until root cause is found. -// This can pop up a "browser_tests would like access to your Contacts" dialog. -// See also http://crbug.com/234008. +// The following test fails under ASAN due to a read-after-free. +// http://crbug.com/234008 #if defined(ADDRESS_SANITIZER) #define MAYBE_DisplayUI DISABLED_DisplayUI #else diff --git a/components/autofill/browser/autofill_metrics_unittest.cc b/components/autofill/browser/autofill_metrics_unittest.cc index 14c5c19..c2beac7 100644 --- a/components/autofill/browser/autofill_metrics_unittest.cc +++ b/components/autofill/browser/autofill_metrics_unittest.cc @@ -295,9 +295,13 @@ AutofillMetricsTest::~AutofillMetricsTest() { void AutofillMetricsTest::SetUp() { TestingProfile* profile = new TestingProfile(); + + // Ensure Mac OS X does not pop up a modal dialog for the Address Book. + autofill::test::DisableSystemServices(profile); + profile->CreateRequestContext(); browser_context_.reset(profile); - PersonalDataManagerFactory::GetInstance()->SetTestingFactory( profile, NULL); + PersonalDataManagerFactory::GetInstance()->SetTestingFactory(profile, NULL); ChromeRenderViewHostTestHarness::SetUp(); io_thread_.StartIOThread(); |