summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-03 18:07:06 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-03 18:07:06 +0000
commitcca788bcd15283ca9d8c2443f5b309615b7e1a57 (patch)
treeb5d197cdc2726bec6b6924719af96256b05a20f7 /chrome/browser
parent06f0eae3de48077c12dbe703f1f995427565b1c1 (diff)
downloadchromium_src-cca788bcd15283ca9d8c2443f5b309615b7e1a57.zip
chromium_src-cca788bcd15283ca9d8c2443f5b309615b7e1a57.tar.gz
chromium_src-cca788bcd15283ca9d8c2443f5b309615b7e1a57.tar.bz2
Port 2 more unit tests. Just small differences between platforms.
This allows password_form_manager_unittest.cc and search_provider_unittest.cc to run on linux/mac. Review URL: http://codereview.chromium.org/118137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/search_provider_unittest.cc5
-rw-r--r--chrome/browser/password_manager/password_form_manager_unittest.cc12
2 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc
index 5b81dc5..ce16482 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/time.h"
+#include "build/build_config.h"
#include "chrome/browser/autocomplete/search_provider.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/net/test_url_fetcher_factory.h"
@@ -139,7 +140,11 @@ void SearchProviderTest::RunTillProviderDone() {
return;
quit_when_done_ = true;
+#if defined(OS_WIN)
message_loop_.Run(NULL);
+#elif defined(OS_POSIX)
+ message_loop_.Run();
+#endif
}
void SearchProviderTest::QueryForInput(const std::wstring& text) {
diff --git a/chrome/browser/password_manager/password_form_manager_unittest.cc b/chrome/browser/password_manager/password_form_manager_unittest.cc
index 8e90ebf..092cfd9 100644
--- a/chrome/browser/password_manager/password_form_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_form_manager_unittest.cc
@@ -15,16 +15,16 @@ class PasswordFormManagerTest : public testing::Test {
PasswordFormManagerTest() {
}
virtual void SetUp() {
- observed_form_.origin = GURL(L"http://www.google.com/a/LoginAuth");
- observed_form_.action = GURL(L"http://www.google.com/a/Login");
+ observed_form_.origin = GURL("http://www.google.com/a/LoginAuth");
+ observed_form_.action = GURL("http://www.google.com/a/Login");
observed_form_.username_element = L"Email";
observed_form_.password_element = L"Passwd";
observed_form_.submit_element = L"signIn";
observed_form_.signon_realm = "http://www.google.com";
saved_match_ = observed_form_;
- saved_match_.origin = GURL(L"http://www.google.com/a/ServiceLoginAuth");
- saved_match_.action = GURL(L"http://www.google.com/a/ServiceLogin");
+ saved_match_.origin = GURL("http://www.google.com/a/ServiceLoginAuth");
+ saved_match_.action = GURL("http://www.google.com/a/ServiceLogin");
saved_match_.preferred = true;
saved_match_.username_value = L"test@gmail.com";
saved_match_.password_value = L"test1";
@@ -168,8 +168,8 @@ TEST_F(PasswordFormManagerTest, TestIgnoreResult) {
saved_match()->ssl_valid = false;
// Different paths for action / origin are okay.
- saved_match()->action = GURL(L"http://www.google.com/b/Login");
- saved_match()->origin = GURL(L"http://www.google.com/foo");
+ saved_match()->action = GURL("http://www.google.com/b/Login");
+ saved_match()->origin = GURL("http://www.google.com/foo");
EXPECT_FALSE(IgnoredResult(manager, saved_match()));
// Done.