From 93fdf4735d0497ee4ef92c8360a36e45ccfe93c1 Mon Sep 17 00:00:00 2001 From: Maksim Sadym <69349599+sadym-chromium@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:23:00 +0200 Subject: [PATCH] fix: replace empty string `namespaceURI` with null (#1285) Temp fix before the CDP fix crrev.com/c/4856861 is landed --------- Co-authored-by: Maksim Sadym --- src/bidiMapper/domains/script/Realm.ts | 4 ++++ .../tests/bidi/script/call_function/result_node.py.ini | 3 --- .../webdriver/tests/bidi/script/evaluate/result_node.py.ini | 3 --- .../tests/bidi/script/call_function/result_node.py.ini | 3 --- .../webdriver/tests/bidi/script/evaluate/result_node.py.ini | 3 --- .../tests/bidi/script/call_function/result_node.py.ini | 3 --- .../webdriver/tests/bidi/script/evaluate/result_node.py.ini | 3 --- 7 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini delete mode 100644 wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini delete mode 100644 wpt-metadata/mapper/headful/webdriver/tests/bidi/script/call_function/result_node.py.ini delete mode 100644 wpt-metadata/mapper/headful/webdriver/tests/bidi/script/evaluate/result_node.py.ini delete mode 100644 wpt-metadata/mapper/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini delete mode 100644 wpt-metadata/mapper/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini diff --git a/src/bidiMapper/domains/script/Realm.ts b/src/bidiMapper/domains/script/Realm.ts index da64ce93b9..19945dd6f6 100644 --- a/src/bidiMapper/domains/script/Realm.ts +++ b/src/bidiMapper/domains/script/Realm.ts @@ -170,6 +170,10 @@ export class Realm { ) { bidiValue.shadowRoot = this.#deepSerializedToBiDi(bidiValue.shadowRoot); } + // `namespaceURI` can be is either `null` or non-empty string. + if (bidiValue.namespaceURI === '') { + bidiValue.namespaceURI = null; + } } // Recursively update the nested values. diff --git a/wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini b/wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini deleted file mode 100644 index 23bbba0662..0000000000 --- a/wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[result_node.py] - [test_attribute_node[basic\]] - expected: FAIL diff --git a/wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini b/wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini deleted file mode 100644 index 23bbba0662..0000000000 --- a/wpt-metadata/chromedriver/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[result_node.py] - [test_attribute_node[basic\]] - expected: FAIL diff --git a/wpt-metadata/mapper/headful/webdriver/tests/bidi/script/call_function/result_node.py.ini b/wpt-metadata/mapper/headful/webdriver/tests/bidi/script/call_function/result_node.py.ini deleted file mode 100644 index 23bbba0662..0000000000 --- a/wpt-metadata/mapper/headful/webdriver/tests/bidi/script/call_function/result_node.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[result_node.py] - [test_attribute_node[basic\]] - expected: FAIL diff --git a/wpt-metadata/mapper/headful/webdriver/tests/bidi/script/evaluate/result_node.py.ini b/wpt-metadata/mapper/headful/webdriver/tests/bidi/script/evaluate/result_node.py.ini deleted file mode 100644 index 23bbba0662..0000000000 --- a/wpt-metadata/mapper/headful/webdriver/tests/bidi/script/evaluate/result_node.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[result_node.py] - [test_attribute_node[basic\]] - expected: FAIL diff --git a/wpt-metadata/mapper/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini b/wpt-metadata/mapper/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini deleted file mode 100644 index 23bbba0662..0000000000 --- a/wpt-metadata/mapper/headless/webdriver/tests/bidi/script/call_function/result_node.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[result_node.py] - [test_attribute_node[basic\]] - expected: FAIL diff --git a/wpt-metadata/mapper/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini b/wpt-metadata/mapper/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini deleted file mode 100644 index 23bbba0662..0000000000 --- a/wpt-metadata/mapper/headless/webdriver/tests/bidi/script/evaluate/result_node.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[result_node.py] - [test_attribute_node[basic\]] - expected: FAIL