| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "public/platform/Platform.h" | 36 #include "public/platform/Platform.h" |
| 37 #include "public/platform/WebUnitTestSupport.h" | 37 #include "public/platform/WebUnitTestSupport.h" |
| 38 #include "public/web/WebDocument.h" | 38 #include "public/web/WebDocument.h" |
| 39 #include "public/web/WebFrame.h" | 39 #include "public/web/WebFrame.h" |
| 40 #include "web/tests/FrameTestHelpers.h" | 40 #include "web/tests/FrameTestHelpers.h" |
| 41 | 41 |
| 42 #include <gmock/gmock.h> | 42 #include <gmock/gmock.h> |
| 43 #include <gtest/gtest.h> | 43 #include <gtest/gtest.h> |
| 44 | 44 |
| 45 using namespace blink; | 45 using namespace blink; |
| 46 using namespace blink; | |
| 47 | 46 |
| 48 class WebSearchableFormDataTest : public testing::Test { | 47 class WebSearchableFormDataTest : public testing::Test { |
| 49 protected: | 48 protected: |
| 50 WebSearchableFormDataTest() | 49 WebSearchableFormDataTest() |
| 51 : m_baseURL("http://www.test.com/") | 50 : m_baseURL("http://www.test.com/") |
| 52 { | 51 { |
| 53 } | 52 } |
| 54 | 53 |
| 55 virtual ~WebSearchableFormDataTest() | 54 virtual ~WebSearchableFormDataTest() |
| 56 { | 55 { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "search_for
m.html"); | 68 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "search_for
m.html"); |
| 70 | 69 |
| 71 WebVector<WebFormElement> forms; | 70 WebVector<WebFormElement> forms; |
| 72 webView->mainFrame()->document().forms(forms); | 71 webView->mainFrame()->document().forms(forms); |
| 73 | 72 |
| 74 EXPECT_EQ(forms.size(), 1U); | 73 EXPECT_EQ(forms.size(), 1U); |
| 75 | 74 |
| 76 WebSearchableFormData searchableFormData(forms[0]); | 75 WebSearchableFormData searchableFormData(forms[0]); |
| 77 EXPECT_EQ("http://www.mock.url/search?hl=en&q={searchTerms}&btnM=Mock+Search
", searchableFormData.url().string()); | 76 EXPECT_EQ("http://www.mock.url/search?hl=en&q={searchTerms}&btnM=Mock+Search
", searchableFormData.url().string()); |
| 78 } | 77 } |
| OLD | NEW |