cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Braden Shepherdson <bra...@chromium.org>
Subject Fwd: Media API, DataResource, and empty URLs
Date Wed, 19 Jun 2013 20:04:11 GMT
The automated tests for Media frequently call new Media() with no URL,
which sends a null to the "create" action. In the past, this got turned
into the string "null" in Java, which was handled as a file named "null"
that didn't exist, and nothing crashed.

DataResource is fine with the files not existing, but it's not fine with
"null" as a filename since it neither has a URL scheme nor is it an
absolute path.

Is there a reason why new Media() should work rather than throwing
IllegalArgumentExceptions for trying to read files with relative paths?
Should I detect and gracefully handle null being given as the media URL in
Javascript? In Java? Should I instead change the mobile-spec tests to use
"file:///dummy" or similar?

Braden

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message