<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>152643</bug_id>
          
          <creation_ts>2016-01-01 16:17:39 -0800</creation_ts>
          <short_desc>[GTK] Several IndexedDB tests failing</short_desc>
          <delta_ts>2016-04-09 11:07:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>149117</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1151866</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-01-01 16:17:39 -0800</bug_when>
    <thetext>The following tests:

  imported/w3c/indexeddb/idbcursor-advance.htm
  imported/w3c/indexeddb/idbcursor-continue.htm
  imported/w3c/indexeddb/idbcursor-direction-index.htm
  imported/w3c/indexeddb/idbindex_get2.htm
  imported/w3c/indexeddb/idbindex_getKey2.htm

Have been failing on the GTK port since they were added in r189264, but these tests pass on the Mac port.


--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbcursor-advance-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbcursor-advance-actual.txt
@@ -1,8 +1,8 @@
 
-FAIL IDBCursor.advance() - advances assert_unreached: unexpected error (UnknownError) Reached unreachable code
-FAIL IDBCursor.advance() - advances backwards assert_unreached: unexpected error (UnknownError) Reached unreachable code
+FAIL IDBCursor.advance() - advances assert_equals: expected 1 but got 4
+FAIL IDBCursor.advance() - advances backwards assert_equals: expected 1 but got 4
 FAIL IDBCursor.advance() - skip far forward assert_unreached: unexpected error (UnknownError) Reached unreachable code
-PASS IDBCursor.advance() - within range 
+FAIL IDBCursor.advance() - within range assert_equals: expected 4 but got 1
 PASS IDBCursor.advance() - within single key range 
-PASS IDBCursor.advance() - within single key range, with several results 
+FAIL IDBCursor.advance() - within single key range, with several results assert_equals: expected 1 but got 4


--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbcursor-continue-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbcursor-continue-actual.txt
@@ -1,8 +1,8 @@
 
-PASS IDBCursor.continue() - continues 
-PASS IDBCursor.continue() - with given key 
+FAIL IDBCursor.continue() - continues assert_equals: expected 1 but got 4
+FAIL IDBCursor.continue() - with given key assert_equals: expected 1 but got 4
 PASS IDBCursor.continue() - skip far forward 
-PASS IDBCursor.continue() - within range 
+FAIL IDBCursor.continue() - within range assert_equals: expected 1 but got 4
 PASS IDBCursor.continue() - within single key range 
-PASS IDBCursor.continue() - within single key range, with several results 
+FAIL IDBCursor.continue() - within single key range, with several results assert_equals: expected 1 but got 4


--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbcursor-direction-index-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbcursor-direction-index-actual.txt
@@ -1,6 +1,6 @@
 
-PASS IDBCursor direction - index - next 
-PASS IDBCursor direction - index - prev 
-PASS IDBCursor direction - index - nextunique 
-PASS IDBCursor direction - index - prevunique 
+FAIL IDBCursor direction - index - next assert_equals: cursor.value expected &quot;Bob:1&quot; but got &quot;Bob:2&quot;
+FAIL IDBCursor direction - index - prev assert_equals: cursor.value expected &quot;Bob:2&quot; but got &quot;Bob:1&quot;
+FAIL IDBCursor direction - index - nextunique assert_equals: cursor.value expected &quot;Bob:1&quot; but got &quot;Bob:2&quot;
+FAIL IDBCursor direction - index - prevunique assert_equals: cursor.value expected &quot;Bob:1&quot; but got &quot;Bob:2&quot;


--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbindex_get2-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbindex_get2-actual.txt
@@ -1,3 +1,3 @@
 
-PASS IDBIndex.get() - returns the record where the index contains duplicate values  
+FAIL IDBIndex.get() - returns the record where the index contains duplicate values  assert_equals: expected 1 but got 2


--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbindex_getKey2-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/indexeddb/idbindex_getKey2-actual.txt
@@ -1,3 +1,3 @@
 
-PASS IDBIndex.getKey() - returns the record&apos;s primary key where the index contains duplicate values  
+FAIL IDBIndex.getKey() - returns the record&apos;s primary key where the index contains duplicate values  assert_equals: expected 1 but got 2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1151898</commentid>
    <comment_count>1</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-01-01 21:25:42 -0800</bug_when>
    <thetext>Unless you have critical need to get them working ASAP, I would hold off worrying about it.

The WK1 work on Modern IDB is almost done, and the design is such that the WK2 work should only be a few additional weeks.

I strongly suspect these will reliably pass on all ports in 1-2 months.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1154274</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-01-10 14:38:06 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Unless you have critical need to get them working ASAP, I would hold off
&gt; worrying about it.

No critical need, just trying to make sure we have bugs filed for failing tests. (The goal is to get our bots to green!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1160458</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-01-30 08:36:02 -0800</bug_when>
    <thetext>Some more tests to investigate once ModernIDB is finished....

storage/indexeddb/clone-exception.html has been failing since r194625: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r195891%20(13442)/storage/indexeddb/clone-exception-diff.txt

storage/indexeddb/connection-leak.html has been failing since r195181: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r195891%20(13442)/storage/indexeddb/connection-leak-diff.txt

Looks like the expectation file just needs updated on that one, since the database names are no longer logged.

storage/indexeddb/database-wrapper.html is failing since r194781: https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r195891%20(13442)/storage/indexeddb/database-wrapper-diff.txt

And storage/indexeddb/keypath-basics.html is failing since r192012-r192023 (probably r192014): https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r195891%20(13442)/storage/indexeddb/keypath-basics-diff.txt

I also found a lot of IndexedDB tests that were improperly skipped on the GTK port without any corresponding bug report. I am adding this bug to them in the expectations file (but feel free to split these out into separate bugs, of course). There are rather a lot of these. All of these expectations are GTK-specific, though it seems unlikely that many of these failures are really GTK-specific, and they are skips, which doesn&apos;t seem like the right expectation (some are reported to be timeouts and crashes):

# Blink tests with unexplained timeouts
storage/indexeddb/database-deletepending-flag.html [ Skip ]
storage/indexeddb/exceptions.html [ Skip ]
storage/indexeddb/intversion-gated-on-delete.html [ Skip ]
storage/indexeddb/intversion-long-queue.html [ Skip ]
storage/indexeddb/open-ordering.html [ Skip ]
storage/indexeddb/transaction-basics.html [ Skip ]
storage/indexeddb/transaction-coordination-within-database.html [ Skip ]

# Blink tests with non-trivial text failures.
storage/indexeddb/createIndex-after-failure.html [ Skip ]
storage/indexeddb/create-object-store-options.html [ Skip ]
storage/indexeddb/cursor-advance.html [ Skip ]
storage/indexeddb/cursor-basics.html [ Skip ]
storage/indexeddb/cursor-continue.html [ Skip ]
storage/indexeddb/cursor-continue-validity.html [ Skip ]
storage/indexeddb/cursor-index-delete.html [ Skip ]
storage/indexeddb/cursor-key-order.html [ Skip ]
storage/indexeddb/cursor-leak.html [ Skip ] # Missing needed WKTR feature?
storage/indexeddb/cursor-overloads.html [ Skip ]
storage/indexeddb/cursor-primary-key-order.html [ Skip ]
storage/indexeddb/cursor-request-cycle.html [ Skip ] # Missing needed WKTR feature?
storage/indexeddb/cursor-update.html [ Skip ]
storage/indexeddb/database-close.html [ Skip ]
storage/indexeddb/database-closepending-flag.html [ Skip ]
storage/indexeddb/database-quota.html [ Skip ]
storage/indexeddb/deleteIndex.html [ Skip ]
storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html [ Skip ]
storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html [ Skip ]
storage/indexeddb/deletedatabase-blocked.html [ Skip ]
storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html [ Skip ]
storage/indexeddb/deletedatabase-delayed-by-versionchange.html [ Skip ]
storage/indexeddb/deletedatabase-not-blocked.html [ Skip ]
storage/indexeddb/deleted-objects.html [ Skip ]
storage/indexeddb/duplicates.html [ Skip ] # Difference between null + undefined
storage/indexeddb/events.html [ Skip ]
storage/indexeddb/factory-cmp.html [ Skip ]
storage/indexeddb/factory-deletedatabase.html [ Skip ]
storage/indexeddb/get-keyrange.html [ Skip ]
storage/indexeddb/index-basics.html [ Skip ] # Difference between null + undefined
storage/indexeddb/index-duplicate-keypaths.html [ Skip ]
storage/indexeddb/index-multientry.html [ Skip ]
storage/indexeddb/index-population.html [ Skip ]
storage/indexeddb/index-unique.html [ Skip ]
storage/indexeddb/intversion-blocked.html [ Skip ]
storage/indexeddb/intversion-close-between-events.html [ Skip ]
storage/indexeddb/intversion-open-in-upgradeneeded.html [ Skip ]
storage/indexeddb/intversion-open-with-version.html [ Skip ] # INTMAX exposed to script as database version
storage/indexeddb/intversion-pending-version-changes-ascending.html [ Skip ]
storage/indexeddb/intversion-pending-version-changes-descending.html [ Skip ]
storage/indexeddb/intversion-pending-version-changes-same.html [ Skip ]
storage/indexeddb/intversion-two-opens-no-versions.html [ Skip ] # INTMAX exposed to script as database version
storage/indexeddb/intversion-upgrades.html [ Skip ]
storage/indexeddb/key-generator.html [ Skip ]
storage/indexeddb/key-type-binary.html [ Skip ]
storage/indexeddb/lazy-index-population.html [ Skip ]
storage/indexeddb/metadata.html [ Skip ]
storage/indexeddb/noblobs.html [ Skip ] # Missing DRT file/blob support
storage/indexeddb/objectstore-autoincrement.html [ Skip ]
storage/indexeddb/objectstore-basics.html [ Skip ]
storage/indexeddb/odd-strings.html [ Skip ]
storage/indexeddb/optional-arguments.html [ Skip ]
storage/indexeddb/persistence.html [ Skip ]
storage/indexeddb/request-leak.html [ Skip ] # Missing WKTR support? GC?
storage/indexeddb/setversion-blocked-by-versionchange-close.html [ Skip ]
storage/indexeddb/setversion-not-blocked.html [ Skip ]
storage/indexeddb/structured-clone.html [ Skip ] # Missing DRT file/blob support
storage/indexeddb/transaction-and-objectstore-calls.html [ Skip ]
storage/indexeddb/transaction-error.html [ Skip ]
storage/indexeddb/transaction-scope-sequencing.html [ Skip ]

# Blink tests that crash the WebProcess.
storage/indexeddb/cursor-cast.html [ Skip ]

# We don&apos;t currently support indexeddb in workers
storage/indexeddb/basics-workers.html [ Skip ]
storage/indexeddb/cursor-advance-workers.html [ Skip ]
storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-workers.html [ Skip ]
storage/indexeddb/dont-commit-on-blocked.html [ Skip ]
storage/indexeddb/factory-basics-workers.html [ Skip ]
storage/indexeddb/index-basics-workers.html [ Skip ]
storage/indexeddb/objectstore-basics-workers.html [ Skip ]
storage/indexeddb/open-twice-workers.html [ Skip ]
storage/indexeddb/pending-activity-workers.html [ Skip ]
storage/indexeddb/pending-version-change-on-exit.html [ Skip ]
storage/indexeddb/pending-version-change-stuck-works-with-terminate.html [ Skip ]
storage/indexeddb/pending-version-change-stuck.html [ Skip ]
storage/indexeddb/transaction-complete-workers.html [ Skip ]
storage/indexeddb/unprefix-workers.html [ Skip ]
http/tests/security/cross-origin-worker-indexeddb-allowed.html [ Skip ]
http/tests/security/cross-origin-worker-indexeddb.html [ Skip ]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162630</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-02-06 10:01:45 -0800</bug_when>
    <thetext>Adding storage/indexeddb/mozilla/cursor-update-updates-indexes.html to this bug. It is flaky; first known failure is r184851 which is the revision right after we enabled IndexedDB.

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/storage/indexeddb/mozilla/cursor-update-updates-indexes-actual.txt
@@ -103,28 +103,7 @@
 indexedDB.deleteDatabase(dbname)
 info = objectStoreInfo[i];
 indexedDB.open(dbname)
-setupObjectStoreAndCreateIndex():
-db = event.target.result
-objectStore = db.createObjectStore(info.name, info.options);
-index = objectStore.createIndex(&apos;data_index&apos;, &apos;data&apos;, { unique: false });
-uniqueIndex = objectStore.createIndex(&apos;unique_data_index&apos;, &apos;data&apos;, { unique: true });
-request = objectStore.add(info.entry);
-trans = db.transaction(info.name, &apos;readwrite&apos;)
-trans.oncomplete = test
-objectStore = trans.objectStore(info.name)
-index = objectStore.index(&apos;data_index&apos;)
-uniqueIndex = objectStore.index(&apos;unique_data_index&apos;)
-request = objectStore.openCursor();
-cursor = request.result;
-value = cursor.value;
-value.data = secondValue;
-request = cursor.update(value);
-request = index.get(secondValue);
-PASS value.data is event.target.result.data
-request = uniqueIndex.get(secondValue);
-PASS value.data is event.target.result.data
-i++;
-db.close()
+FAIL Error function called unexpectedly: (UnknownError) undefined
 PASS successfullyParsed is true
 
 TEST COMPLETE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1168256</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-02-25 15:16:05 -0800</bug_when>
    <thetext>Editing the blocking relationship - Fixing these on GTK doesn&apos;t block the Modern IDB bug, but rather the Modern IDB bug blocks exploring these failures.

As of a few hours ago, Modern IDB is enabled by default in WK2 and Legacy IDB no longer exists.

It&apos;s possible these &quot;just work&quot; now - Somebody should give it a look!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1182458</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-04-09 10:30:25 -0700</bug_when>
    <thetext>The following tests are now passing:

webkit.org/b/152643 imported/w3c/web-platform-tests/IndexedDB/idbcursor-advance.htm [ Failure ]
webkit.org/b/152643 imported/w3c/web-platform-tests/IndexedDB/idbcursor-continue.htm [ Failure ]
webkit.org/b/152643 imported/w3c/web-platform-tests/IndexedDB/idbcursor-direction-index.htm [ Failure ]
webkit.org/b/152643 imported/w3c/web-platform-tests/IndexedDB/idbindex_get2.htm [ Failure ]
webkit.org/b/152643 imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey2.htm [ Failure ]
webkit.org/b/152643 storage/indexeddb/clone-exception.html [ Failure ]
webkit.org/b/152643 storage/indexeddb/database-wrapper.html [ Failure ]
webkit.org/b/152643 storage/indexeddb/keypath-basics.html [ Failure ]
webkit.org/b/152643 storage/indexeddb/mozilla/cursor-update-updates-indexes.html [ Failure Pass ]

This test is the only one that is currently failing:

webkit.org/b/152643 storage/indexeddb/connection-leak.html [ Failure ]

The output is:

doFirstOpen():
request = indexedDB.open(dbname, 1)
sawUpgradeNeeded1 = false

onUpgradeNeeded1():
sawUpgradeNeeded1 = true

onOpenSuccess1():
PASS sawUpgradeNeeded1 is true
db = request.result
db.close()

doSecondOpen():
request = indexedDB.open(dbname, 1)

onOpenSuccess2():
db = request.result
db = null
request = null
Run GC outside of request&apos;s callback via setTimeout()
window.gc()

doThirdOpen():
request = indexedDB.open(dbname, 2)
sawUpgradeNeeded3 = false
FAIL onblocked called unexpectedly. oldVersion = 1, newVersion = 2
PASS successfullyParsed is true

TEST COMPLETE

I am also unskipping the huge list of skipped IndexedDB tests, so we can see which ones are fixed and which are still broken. Updated expectations in r199270.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1182466</commentid>
    <comment_count>7</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-04-09 10:46:38 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; The following tests are now passing:
&gt;...
&gt; This test is the only one that is currently failing:
&gt; 
&gt; webkit.org/b/152643 storage/indexeddb/connection-leak.html [ Failure ]

This one relies on some GC internals thing that V8 had when Google was in the project.

IIRC, it&apos;s skipped on all the mac platforms, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1182470</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-04-09 11:07:25 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; This one relies on some GC internals thing that V8 had when Google was in
&gt; the project.
&gt; 
&gt; IIRC, it&apos;s skipped on all the mac platforms, too.

Great, it is indeed. I removed the GTK expectation in r199271.

Now, all the tests reported as failing in this bug have been fixed. I see a couple new failures after unskipping that huge amount of IndexedDB tests, but let&apos;s use a new bug to track them: bug #156438.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>