From e68348298f1f0905d6014c8bd5f6da2a3b6233d8 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 21 Nov 2020 18:34:40 +0000 Subject: [PATCH] LibWeb: Add a test for the new event dispatcher --- ...event-bubbling-and-multiple-listeners.html | 186 ++++++++++++++++++ Base/res/html/misc/welcome.html | 1 + 2 files changed, 187 insertions(+) create mode 100644 Base/res/html/misc/event-bubbling-and-multiple-listeners.html diff --git a/Base/res/html/misc/event-bubbling-and-multiple-listeners.html b/Base/res/html/misc/event-bubbling-and-multiple-listeners.html new file mode 100644 index 0000000000..4ef0bd68c6 --- /dev/null +++ b/Base/res/html/misc/event-bubbling-and-multiple-listeners.html @@ -0,0 +1,186 @@ + + + + Event Bubbling and Multiple Listeners + + +

There are four lists listening to the mousedown event.

+ +

For the test to pass, it must match the reference.

+

Only the first click counts. (I didn't want to figure out stopping multiple clicks)

+ +

List One:

+

Result:

+
+

+
+

+

+ Click me! +

+
+
+

Reference:

+
+

3 (PASS)

+

2 (PASS)

+

1 (PASS)

+
+ +

List Two:

+

Result:

+
+

+
+

+

+ Click me! +

+
+
+

Reference:

+
+

2 (PASS)

+

1 (PASS)

+
+ +

List Three:

+

(Test fails if FAIL is shown on screen)

+

Result:

+
+

+
+

+

+ Click me! +

+
+
+

Reference:

+
+

1 (PASS)

+
+ +

List Four:

+

(Test fails if FAIL is shown on screen)

+

Result:

+
+

+
+

+

+ Click me! +

+
+
+

Reference:

+
+

3 (PASS)

+

2 (PASS)

+

1 (PASS)

+
+ + + + diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index f11253496f..7232e383b7 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -35,6 +35,7 @@ span#loadtime {

This page loaded in ms

Some small test pages: