summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.pngbin5636 -> 5148 bytes
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.txt14
-rwxr-xr-x[-rw-r--r--]webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum2
-rwxr-xr-x[-rw-r--r--]webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.pngbin11081 -> 13563 bytes
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.txt29
-rw-r--r--webkit/glue/chromium_bridge_impl.cc11
-rw-r--r--webkit/glue/webkit_resources.h5
-rw-r--r--webkit/tools/layout_tests/test_lists/win/tests_fixable.txt7
-rwxr-xr-xwebkit/tools/test_shell/resources/deleteButton.pngbin0 -> 2231 bytes
-rw-r--r--webkit/tools/test_shell/test_shell.cc49
11 files changed, 94 insertions, 25 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.checksum
index 1b3fb07..d29aee2 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.checksum
@@ -1 +1 @@
-96c6e09551f465c751f7b5621ec8acff \ No newline at end of file
+e80f75e272471ed8e70d68cef78910ef \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.png
index e749346..aef4219 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.txt
new file mode 100755
index 0000000..28d4f26
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/5408255-expected.txt
@@ -0,0 +1,14 @@
+ALERT: 22
+ALERT: 96
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x40
+ RenderText {#text} at (0,0) size 744x39
+ text run at (0,0) width 744: "This tests for a bug where the delete button wouldn't work because it had -webkit-user-select:none instead of -webkit-user-"
+ text run at (0,20) width 82: "select:ignore. "
+ text run at (82,20) width 428: "The list should be removed, the editable region below should be empty."
+ RenderBlock {DIV} at (0,56) size 784x32
+caret: position 0 of child 3 {DIV} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum
index f8793ab..def55e0f 100644..100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.checksum
@@ -1 +1 @@
-0791a37bd1705acb00dadc0bc65b2ca5 \ No newline at end of file
+33e0e167e1cacc724eed51c3a12544fa \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png
index b805f4b..7970d65 100644..100755
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.txt
new file mode 100755
index 0000000..ec034a8
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/editing/deleting/deletionUI-single-instance-expected.txt
@@ -0,0 +1,29 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x60
+ RenderText {#text} at (0,0) size 759x59
+ text run at (0,0) width 430: "This test can only be run with DRT and not manually from the browser. "
+ text run at (430,0) width 329: "This test makes sure that we don't make the mistake of"
+ text run at (0,20) width 730: "adding new m_containerElements to the DeletionUI over and over again. A successful run of the test will not have multiple"
+ text run at (0,40) width 381: "instances of deletion UI render objects at the same coordinates:"
+ RenderBlock {DIV} at (0,76) size 784x118
+layer at (24,100) size 752x86 layerType: background only
+layer at (20,96) size 760x94
+ RenderBlock (positioned) zI: -1000000 {DIV} at (-4,-4) size 760x94 [border: (4px solid #00000099)]
+layer at (24,100) size 752x86 layerType: foreground only
+ RenderTable {TABLE} at (16,16) size 752x86
+ RenderTableSection {TBODY} at (0,0) size 752x86
+ RenderTableRow {TR} at (0,2) size 752x82
+ RenderTableCell {TD} at (2,2) size 748x82 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (1,1) size 746x79
+ text run at (1,1) width 717: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas odio. Morbi sed tortor id nisl bibendum commodo. "
+ text run at (1,21) width 744: "Donec pede. Praesent accumsan dui vitae mauris. Mauris non dui at neque lacinia pulvinar. Quisque nibh. Nulla vitae lectus. "
+ text run at (1,41) width 746: "Pellentesque enim. Mauris hendrerit molestie dui. Etiam pretium ligula a pede. Fusce consectetuer purus sit amet sem. Morbi "
+ text run at (1,61) width 229: "tincidunt mollis libero. Maecenas mole"
+ RenderBlock {DIV} at (0,0) size 752x0
+layer at (7,85) size 30x30
+ RenderImage zI: 1000000 {IMG} at (-17,-15) size 30x30
+caret: position 403 of child 0 {#text} of child 1 {TD} of child 0 {TR} of child 1 {TBODY} of child 1 {TABLE} of child 3 {DIV} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index 5774439..515e2e8 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -339,10 +339,13 @@ PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name) {
resource_id = IDR_TICKMARK_DASH;
} else if (!strcmp(name, "panIcon")) {
resource_id = IDR_PAN_SCROLL_ICON;
- } else if (!strcmp(name, "deleteButton") ||
- !strcmp(name, "deleteButtonPressed")) {
- NOTREACHED() << "Image resource " << name << " does not exist yet.";
- return Image::nullImage();
+ } else if (!strcmp(name, "deleteButton")) {
+ if (webkit_glue::IsLayoutTestMode()) {
+ resource_id = IDR_EDITOR_DELETE_BUTTON;
+ } else {
+ NOTREACHED() << "editor deletion UI should be disabled";
+ return Image::nullImage();
+ }
} else {
NOTREACHED() << "Unknown image resource " << name;
return Image::nullImage();
diff --git a/webkit/glue/webkit_resources.h b/webkit/glue/webkit_resources.h
index 372bc35..344072b 100644
--- a/webkit/glue/webkit_resources.h
+++ b/webkit/glue/webkit_resources.h
@@ -7,6 +7,11 @@
#define IDR_PAN_SCROLL_ICON 2003
#define IDR_TEXTAREA_RESIZER 2004
+// The editor delete button is only used in layout tests so the actual
+// resource isn't in webkit_resources.rc. This resource should not be
+// used outside of layout tests.
+#define IDR_EDITOR_DELETE_BUTTON 2005
+
#define IDC_ALIAS 2100
#define IDC_CELL 2101
#define IDC_COLRESIZE 2102
diff --git a/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt
index caaa123..f3381f8 100644
--- a/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt
+++ b/webkit/tools/layout_tests/test_lists/win/tests_fixable.txt
@@ -249,9 +249,6 @@ LayoutTests/http/tests/navigation/post-goback1.html = FAIL
// Bug 1135948: Fails because we cannot call plugins as functions.
LayoutTests/plugins/bindings-test.html = FAIL
-// Bug 1124435: deal with the deletion UI in a later release.
-LayoutTests/editing/deleting/deletionUI-single-instance.html = FAIL
-
// Bug 871718: These tests load data: URLs into frames and sets queries on then.
// This is totally broken. This layout test should be rewitten so that the
// subframes are not data URLs (probably we want files in the resources dir.).
@@ -346,10 +343,6 @@ LayoutTests/fast/js/var-declarations-shadowing.html = FAIL
// Agreed, not required for Beta, we can debate this with WebKit post Beta, (eseidel, 4/25)
LayoutTests/fast/dom/getter-on-window-object2.html = FAIL
-// Bug: 1042653
-// We don't support WebKit-Editing-Delete-Button
-LayoutTests/editing/deleting/5408255.html = FAIL
-
// Bug: 1042838
// User stylesheets not currently supported by chrome.
// Webkit supports them by doing filesystem operations directly.
diff --git a/webkit/tools/test_shell/resources/deleteButton.png b/webkit/tools/test_shell/resources/deleteButton.png
new file mode 100755
index 0000000..8f1b881
--- /dev/null
+++ b/webkit/tools/test_shell/resources/deleteButton.png
Binary files differ
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 9d236a6..02d268c 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -442,32 +442,57 @@ bool GetPreferredExtensionForMimeType(const std::string& mime_type,
}
std::string GetDataResource(int resource_id) {
- if (resource_id == IDR_BROKENIMAGE) {
+ switch (resource_id) {
+ case IDR_BROKENIMAGE: {
// Use webkit's broken image icon (16x16)
static std::string broken_image_data;
if (broken_image_data.empty()) {
- std::wstring path;
+ FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
- file_util::AppendToPath(&path, L"webkit");
- file_util::AppendToPath(&path, L"tools");
- file_util::AppendToPath(&path, L"test_shell");
- file_util::AppendToPath(&path, L"resources");
- file_util::AppendToPath(&path, L"missingImage.gif");
- bool success = file_util::ReadFileToString(path, &broken_image_data);
+ path = path.Append(FILE_PATH_LITERAL("webkit"));
+ path = path.Append(FILE_PATH_LITERAL("tools"));
+ path = path.Append(FILE_PATH_LITERAL("test_shell"));
+ path = path.Append(FILE_PATH_LITERAL("resources"));
+ path = path.Append(FILE_PATH_LITERAL("missingImage.gif"));
+ bool success = file_util::ReadFileToString(path.ToWStringHack(),
+ &broken_image_data);
if (!success) {
- LOG(FATAL) << "Failed reading: " << path;
+ LOG(FATAL) << "Failed reading: " << path.value();
}
}
return broken_image_data;
- } else if (resource_id == IDR_FEED_PREVIEW) {
+ }
+ case IDR_FEED_PREVIEW:
// It is necessary to return a feed preview template that contains
// a {{URL}} substring where the feed URL should go; see the code
// that computes feed previews in feed_preview.cc:MakeFeedPreview.
// This fixes issue #932714.
return std::string("Feed preview for {{URL}}");
- } else {
- return std::string();
+ case IDR_EDITOR_DELETE_BUTTON:{
+ // Use webkit's delete button image.
+ static std::string delete_button_data;
+ if (delete_button_data.empty()) {
+ FilePath path;
+ PathService::Get(base::DIR_SOURCE_ROOT, &path);
+ path = path.Append(FILE_PATH_LITERAL("webkit"));
+ path = path.Append(FILE_PATH_LITERAL("tools"));
+ path = path.Append(FILE_PATH_LITERAL("test_shell"));
+ path = path.Append(FILE_PATH_LITERAL("resources"));
+ path = path.Append(FILE_PATH_LITERAL("deleteButton.png"));
+ bool success = file_util::ReadFileToString(path.ToWStringHack(),
+ &delete_button_data);
+ if (!success) {
+ LOG(FATAL) << "Failed reading: " << path.value();
+ }
+ }
+ return delete_button_data;
}
+
+ default:
+ break;
+ }
+
+ return std::string();
}
GlueBitmap GetBitmapResource(int resource_id) {