Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: chrome/renderer/form_manager_unittest.cc

Issue 3148027: Disable crashy FormManagerTest.LabelsInferredFromParagraph (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string_util.h" 5 #include "base/string_util.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/renderer/form_manager.h" 7 #include "chrome/renderer/form_manager.h"
8 #include "chrome/test/render_view_test.h" 8 #include "chrome/test/render_view_test.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h"
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 20), 805 20),
806 fields[1]); 806 fields[1]);
807 EXPECT_EQ(FormField(string16(), 807 EXPECT_EQ(FormField(string16(),
808 ASCIIToUTF16("reply-send"), 808 ASCIIToUTF16("reply-send"),
809 ASCIIToUTF16("Send"), 809 ASCIIToUTF16("Send"),
810 ASCIIToUTF16("submit"), 810 ASCIIToUTF16("submit"),
811 0), 811 0),
812 fields[2]); 812 fields[2]);
813 } 813 }
814 814
815 TEST_F(FormManagerTest, LabelsInferredFromText) { 815 // Crashy, http://crbug.com/52731.
816 TEST_F(FormManagerTest, DISABLED_LabelsInferredFromText) {
816 LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">" 817 LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
817 " First name:" 818 " First name:"
818 " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>" 819 " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
819 " Last name:" 820 " Last name:"
820 " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>" 821 " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
821 " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>" 822 " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
822 "</FORM>"); 823 "</FORM>");
823 824
824 WebFrame* web_frame = GetMainFrame(); 825 WebFrame* web_frame = GetMainFrame();
825 ASSERT_NE(static_cast<WebFrame*>(NULL), web_frame); 826 ASSERT_NE(static_cast<WebFrame*>(NULL), web_frame);
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 2447
2447 WebElement e = web_frame->document().getElementById("firstname"); 2448 WebElement e = web_frame->document().getElementById("firstname");
2448 WebFormControlElement firstname = e.to<WebFormControlElement>(); 2449 WebFormControlElement firstname = e.to<WebFormControlElement>();
2449 2450
2450 // Hidden form control element should not have a label set. 2451 // Hidden form control element should not have a label set.
2451 FormManager form_manager; 2452 FormManager form_manager;
2452 EXPECT_EQ(string16(), form_manager.LabelForElement(firstname)); 2453 EXPECT_EQ(string16(), form_manager.LabelForElement(firstname));
2453 } 2454 }
2454 2455
2455 } // namespace 2456 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698